Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rm(1) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

file(1)

ls(1)

unlink(2)



rm(1)                          DG/UX 5.4R3.00                          rm(1)


NAME
       rm, rmdir - remove, delete files or directories

SYNOPSIS
       rm [ -f ] [ -i ] file ...

       rm -r [ -f ] [ -i ] dirname

       rmdir [ -p ] [ -S ] dirname


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.  It 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.

       Options are:

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

       -r      If the file to be removed is a directory, recursively deletes
               the entire contents of the specified directory and the
               directory itself.

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

       Rmdir removes entries for the named directories, which must be empty.

       Options are:

       -p     Try to delete the named directory and all its parent
              directories, which become empty.  Prints a message to standard
              output indicating whether or not the whole path is removed or
              part of the path remains.

       -s     Don't print messages to standard output when -p is in effect.








Licensed material--property of copyright holder(s)                         1




rm(1)                          DG/UX 5.4R3.00                          rm(1)


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 (..).

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

NOTES
       If a ".*" is specified in the rm command line, the ".*" will be
       expanded to the files dot and dot-dot.  This will cause rm to remove
       the files in the current directory and the files in the directory one
       level up.  Entering the command "rm -r .*" in a directory such as
       /tmp, will cause rm to go up to the "/" directory and remove all
       files on your system.





















Licensed material--property of copyright holder(s)                         2


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