32v 1m rm

From Computer History Wiki
Jump to: navigation, search

RM(1) UNIX Programmer's Manual RM(1)


    rm, rmdir  - remove (unlink) files


    rm [ -fri ] file ...
    rmdir dir ...


    _R_m removes the entries for one or more files from a direc-
    tory.  If an entry was 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.
    If a file has no write permission and the standard input is
    a terminal, its permissions are printed and a line is read
    from the standard input.  If that line begins with `y' the
    file is deleted, otherwise the file remains.  No questions
    are asked when the -f (force) option is given.
    If a designated file is a directory, an error comment is
    printed unless the optional argument -r has been used.  In
    that case, _r_m recursively deletes the entire contents of the
    specified directory, and the directory itself.
    If the -i (interactive) option is in effect, _r_m asks whether
    to delete each file, and, under -r, whether to examine each
    _R_m_d_i_r removes entries for the named directories, which must
    be empty.




    Generally self-explanatory.  It is forbidden to remove the
    file `..' merely to avoid the antisocial consequences of
    inadvertently doing something like `rm -r .*'.