Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

unlink(2)

rmdir(2)

RM(1)                                BSD                                 RM(1)



NAME
     rm, rmdir  - remove (unlink) files or directories

SYNOPSIS
     rm [ -fri ] [ - ] file ...

     rmdir dir ...

DESCRIPTION
     The rm command removes the entries for one or more files from a
     directory.  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 you do not have write permission on a file and the standard input is a
     terminal, rm prints the file's permissions and reads a line from the
     standard input.  If that line begins with "y", the file is deleted;
     otherwise, the file remains.  If a designated file is a directory, rm
     prints an error comment unless you use the -r option.

     The rmdir command removes entries for the named directories, which must
     be empty.

OPTIONS
     -f        Force. Suppress questions and don't report errors.

     -r        Recursively delete the entire contents of the specified
               directory and the directory itself.

     -i        Interactive; ask whether to delete each file.  With the -r
               option, ask whether to examine each directory.

     -         Indicate that all the arguments following it are to be treated
               as filenames.  This option allows the specification of
               filenames starting with a minus sign (-).

SEE ALSO
     unlink(2), rmdir(2)

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