rm - Remove files
$ rm [options...] <path...>
rm
removes files specified in path
.
If a directory is specified in path
, the -r
(recursive) flag is required. Otherwise, an error occurs.
-r
, --recursive
: Remove files and directories recursively-f
, --force
: Do not prompt before removing-v
, --verbose
: Display what files are removed--no-preserve-root
: Do not treat '/' specially# Remove README.md file
$ rm README.md
# Remove Tests directory
$ rm -r Tests
rmdir
(1) to just delete empty directories