Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ purge(C) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

autoboot(ADM)

dd(C)

hd(C)

od(C)

rm(C)

purge(F)

sysadmsh(ADM)


     PURGE(C)                                   UNIX System V



     Name
          purge - overwrites specified files


     Syntax
          purge [ -f ] [ -r ] [ -v ] [ -m num ] [ -suo ] [ -t  type  ]
          ... [ -z ] [ files ] ...



     Description
          The command is  used  to  overwrite  various  parts  of  the
          system.   It overwrites files specified on the command line,
          or those listed in a policy file maintained  by  the  system
          administrator.   The  policy file defines types of files and
          devices which are purged as a group. The utility can be used
          to  purge individual files, divvy(ADM) divisions, fdisk(ADM)
          partitions,  or  other  devices  like  magnetic  tapes   and
          floppies.  An option even exists to zero memory.

          The optional flags are outlined below:

          -f       Do not warn about files which are  not  present  or
                   inaccessible.  Attempts  to purge a floppy which is
                   inaccessible (e.g., the door is open)  will  always
                   generate a diagnostic on the system console.

          -r       Recursively purge directories. Without this flag no
                   action is taken upon directories.

          -v       Verbose operation, list the name of each file as it
                   is overwritten.

          -m num   Overwrite each file num times.

          -s       Overwrite   files   and   devices   designated   as
                   ``system''  in the policy file. (Equivalent to ``-t
                   system''.)

          -u       Overwrite files and devices designated as  ``user''
                   in the policy file. (Equivalent to ``-t user''.)

          -o       Overwrite other (non-system and non-user) files and
                   filesystems.  This purges all entries in the policy
                   file which are not of either type system  or  user.
                   This   flag,   by   the   nature  of  its  implicit
                   definition, has no ``-t'' equivalent.

          -t type  Overwrite the files identified in the  policy  file
                   as being part of group type.

          -z       Writes binary zeroes to  system  memory,  including
                   memory  buffers  of  intelligent devices (i.e. disk
                   controller cache, etc.).  This will close down  the
                   system  immediately.  This should only be done from
                   single-user mode, or when no users are  logged  on.
                   The  system  will  autoboot  if  so configured (see
                   autoboot(M)).  Only  the  superuser  may  use  this
                   option.

          files    Regular, directory or special files to purge.

          Similarly to regular files, most special files can be purged
          by being placed in the policy file or with the command purge
          /dev/special_file. Block special files  and  some  character
          special   files  can  be  overwritten.  The  console,  ttys,
          printers and other infinite output devices cannot be  purged
          with this command. Disks, floppies and magnetic tapes can be
          overwritten.  Tape devices are first erased  once  and  then
          overwritten the specified number of times.

          When both types and files are specified on the command line,
          all  of  the indicated files are overwritten by the utility.
          In particular, first the  files  selected  from  the  policy
          file,  and  then  those  specified  on the command line, are
          overwritten.

          Each line in the policy file (/etc/default/purge) designates
          a  file,  filesystem or device as a member of some type. The
          syntax of a line is:

               file type [ count ]

          The optional count field is the number of times to overwrite
          file.  The default count is one.  The utility will overwrite
          file any time the command

               purge  -t  type

          is given.

          Blank lines in the policy file and lines beginning with  `#'
          are ignored.


     Files
          /etc/default/purge       The policy file


     See Also
          autoboot(ADM),  dd(C),  hd(C),   od(C),   rm(C),   purge(F),
          sysadmsh(ADM)


     Diagnostics
          purge: warning: invalid entry in policy file (line n)

          An invalid line was read from the policy file where n is the
          number of the incorrectly formatted line.

          purge: filename is a directory

          If the -r switch is not specified no action  is  taken  upon
          directories and this diagnostic is displayed.

          purge: only the superuser can zero memory

          This message  is  displayed  when  a  user  other  than  the
          superuser tries to use the -z option.


     Notes
          When files are overwritten multiple times,  the  first  pass
          writes  binary  zeros.  Subsequent  passes alternate writing
          binary ones and binary zeros.

          After being overwritten, od(C), dd(C) or hd(C) may  be  used
          to verify that no data remains on the device or in the file.

          Only the superuser  may  use  the  -z  option  to  zero  the
          system's memory.


     Value Added
          purge is an extension of AT&T System V provided by the Santa
          Cruz Operation.


     (printed 8/28/89)                                  PURGE(C)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026