Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rm(1) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rmdir(1)

file(1)

ls(1)

unlink(2)



rm(1)                          DG/UX R4.11MU05                         rm(1)


NAME
       rm - remove files

SYNOPSIS
       rm [ -firR ] file ...


DESCRIPTION
       Rm removes the entries for one or more files from a directory.  If an
       entry is the last link to the file, the file is destroyed.  Removal
       of a file requires write permission in its directory, but neither
       read nor write permission on the file itself.

       When you try to remove a file that does not have write permission and
       the input is a terminal, the file's permissions, followed by a
       question mark, are printed and a line is read from the standard
       input.  If the line that you type in begins with y, the file is
       deleted; otherwise, the file remains.

       If you try to remove a file that is a directory, an error message is
       printed.  You will not get an error message if you use the optional
       argument -r or -R.

       Options are:

       -f      Turns prompting off for removing files that the user has no
               write permission on.

       -i      Interactive mode: rm and, under -r or -R, whether to examine
               each directory.

       -r      If the file to be removed is a directory, recursively deletes
               the entire contents of the specified directory and the
               directory itself. Symbolic links that are encountered with
               this option will not be traversed.

       -R      This option is the same as -r.


EXAMPLES
       $ rm code

       Removes the file named "code" from the current working directory.

       $ rm -i *.o

       You are asked whether each file that ends in ".o" should be removed.
       If you had a file "jqr.o", the  rm  command would print

       jqr.o: ?

        rm  waits for you to respond "y" for yes, or "n" for no.

       $ rm -rf $HOME/ITEMS

       All files and directories in the directory "$HOME/ITEMS" are removed
       and then the directory "ITEMS" itself is removed.  If you do not have
       write permission for a file, the "f" option removes it without
       notifying you of that fact.

DIAGNOSTICS
       Generally self-explanatory.  You can't remove the parent directory
       pointer file (..).

       rm returns the following exit values:

        0     If the -f option was not specified, all the named directory
              entries were removed;  otherwise, all the existing named
              directory entries were removed.

       >0     An error occured.

SEE ALSO
       rmdir(1), file(1), ls(1).
       unlink(2)


Licensed material--property of copyright holder(s)

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