rm ( 1 ) USER COMMANDSrm ( 1 )


NAME

rm - remove files

SYNOPSIS

rm [ options ] file ...

DESCRIPTION

rm removes the named file arguments. By default it does not remove directories. If a file is unwritable, the standard input is a terminal, and the --force option is not given, rm prompts the user for whether to remove the file. An affirmative response (y or Y) removes the file, a quit response (q or Q) causes rm to exit immediately, and all other responses skip the current file.

OPTIONS

-c|F, --clear|clobber
Clear the contents of each file before removing by writing a 0 filled buffer the same size as the file, executing fsync(2) and closing before attempting to remove. Implemented only on systems that support fsync(2).
-d, --directory
remove(3) (or unlink(2)) directories rather than rmdir(2), and don't require that they be empty before removal. The caller requires sufficient privilege, not to mention a strong constitution, to use this option. Even though the directory must not be empty, rm still attempts to empty it before removal.
-f, --force
Ignore nonexistent files and never prompt the user.
-i, --interactive|prompt
Prompt whether to remove each file. An affirmative response (y or Y) removes the file, a quit response (q or Q) causes rm to exit immediately, and all other responses skip the current file.
-r|R, --recursive
Remove the contents of directories recursively.
-u, --unconditional
If --recursive and --force are also enabled then the owner read, write and execute modes are enabled (if not already enabled) for each directory before attempting to remove directory contents.
-v, --verbose
Print the name of each file before removing it.

SEE ALSO

mv(1), rmdir(2), unlink(2), remove(3)

IMPLEMENTATION

version
rm (AT&T Research) 2006-11-21
author
Glenn Fowler <gsf@research.att.com>
author
David Korn <dgk@research.att.com>
copyright
Copyright © 1992-2008 AT&T Intellectual Property
license
http://www.opensource.org/licenses/cpl1.0.txt