Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rm(1) — DG/UX 4.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought



                                                                    rm(1)



        _________________________________________________________________
        rm, rmdir                                                 Command
        remove, delete files or directories
        _________________________________________________________________


        SYNTAX

        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 asks whether to delete each file,
                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



        DG/UX 4.00                                                 Page 1
               Licensed material--property of copyright holder(s)





                                                                    rm(1)



             removed or part of the path remains.

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



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


        SEE ALSO

        unlink(2) in the Programmer's Reference for the DG/UX System


        DIAGNOSTICS

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









        DG/UX 4.00                                                 Page 2
               Licensed material--property of copyright holder(s)



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