February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Removes (unlinks) files or directories.
Syntax
rm [-efirR] [--] file...
Options
-f forces the deletion of the file with no prompting and no error messages (good for script use).
-i prompts you before deleting each file.
-r permits the recursive removal of directories and their contents.
-- allows filenames beginning with -.
Oddities
Only when a filename is the last link to a file is the storage actually deallocated.
Example
$ ln buzz8 buzz9 # Create a link to buzz8's data $ $ ln buzz8 buzz10 # Create another link to buzz8's data $ $ ls -l buzz[891]* # Note link count -r-x-w-r-x 3 obrien users 47 Nov 27 13:31 buzz10 -r-x-w-r-x 3 obrien users 47 Nov 27 13:31 buzz8 -r-x-w-r-x 3 obrien users 47 Nov 27 13:31 buzz9 $ $ rm ...
Read now
Unlock full access