Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

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)                        19 June 1992                        purge(C)


 Name

    purge - overwrite specified files

 Syntax

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

 Description

    The purge command is used to overwrite various parts of the system.  It
    overwrites files specified on the command line, or those listed in a pol-
    icy 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) par-
    titions, 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 (for example,
             the door is open) will always generate a diagnostic on the sys-
             tem 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 overwrit-
             ten.

    -m num   Overwrite each file num times.

    -s       Overwrite files and devices designated as ``system'' in the pol-
             icy file. (Equivalent to -tsystem.)

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

    -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 (that is, 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(ADM)).
             Only the super user 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 com-
    mand 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 com-
    mand

       purge  -t type

    is given.

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

 File

    /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 super user 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 super user 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 Opera-
    tion, Inc.


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