Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ destroy(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ln(1)

rm(1)

wcheck(1)

secure(1M)

destroy(1)                                                       destroy(1)

NAME
     destroy - physically delete files

SYNOPSIS
     destroy [option ...] file ...

DESCRIPTION
     destroy overwrites files with selectable characters and then deletes
     the directory entry for each file. destroy can only be used to over-
     write and delete regular files.

     The rm command does not physically delete files from the disk; so it
     is theoretically still possible to read data processed by rm by using
     the block and raw device special files.

OPTIONS
     No option specified:
          The input files are overwritten with binary zeros and then
          deleted. destroy does not overwrite and delete files with multi-
          ple hard links (the link counter must be on 1).

          If the file to be destroyed is a symbolic link, it is deleted
          from the directory and the file it references is overwritten with
          binary zeros.

     -cX  (character) The input files are overwritten with the character
          you specify here, instead of with binary zeros.

     -i   (interactive mode) destroy asks you for confirmation before
          deleting each file.

     -l   (linked files) destroy will also overwrite and delete files with
          multiple hard links (link counter set to more than 1). The file
          itself is destroyed and all links to it are removed.

          -l not specified:

          destroy does not overwrite and delete files with multiple links.

     -s   (silent mode) Error messages are suppressed.

     file Name of the file you wish to destroy. destroy will only delete
          regular files. You may name more than one file.












Page 1                       Reliant UNIX 5.44                Printed 11/98

destroy(1)                                                       destroy(1)

ERROR MESSAGES
     destroy: cannot overwrite filename (Permission denied)
          As you do not have write permission for filename, destroy cannot
          overwrite it.

     destroy: cannot destroy directory dirname
          You have tried to apply destroy to a directory dirname; destroy
          can only be used to delete regular files.

     destroy: file filename has n links -- not destroyed
          There are n links (n > 1) to the input file filename; destroy
          does not delete files with multiple links unless you use the -l
          option.

     destroy: cannot stat filename (No such file or directory)
          The file filename does not exist.

LOCALE
     The LCMESSAGES environment variable governs the language in which
     message texts are displayed. If LCMESSAGES is undefined or is defined
     as the null string, it defaults to the value of LANG. If LANG is like-
     wise undefined or null, the system acts as if it were not internation-
     alized. Answers to yes/no queries must be given in the language
     appropriate to the current locale.

     The LCALL environment variable governs the entire locale. LCALL
     takes precedence over all the other environment variables which affect
     internationalization.

EXAMPLES
     The current directory contains a file named file. You first use ln to
     make another link to this file:

     $ ln file copy
     $ ls -l
     -rw-------   2 hugo   project   14  Jan 16 15:04 file
     -rw-------   2 hugo   project   14  Jan 16 15:04 copy
     $ cat file
     Good morning!
     $ cat copy
     Good morning!

     The file can now be accessed under both names, although it is physi-
     cally present only once.

     $ destroy file
     destroy: file file has 2 links -- not destroyed

     destroy does not overwrite and delete the file in this case, since it
     has two links.




Page 2                       Reliant UNIX 5.44                Printed 11/98

destroy(1)                                                       destroy(1)

     $ destroy -l -cX file

     destroy overwrites the file this time, since you have used the -l
     option. The -cX option causes the file contents to be overwritten with
     X. destroy then deletes the link named file.

     $ ls -l
     -rw-------   1 hugo   project   14  Jan 16 15:04 copy
     $ cat copy
     XXXXXXXXXXXXXX

SEE ALSO
     ln(1), rm(1), wcheck(1), secure(1M).









































Page 3                       Reliant UNIX 5.44                Printed 11/98

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