Name
rm — stdin stdout - file -- opt --help --version
Synopsis
rm [options]files|directories
The rm (remove) command can
delete files:
➜ rm file1 file2 file3or recursively delete directories and all their subdirectories:
➜ rm -r dir1 dir2Useful options
| Interactive mode. Ask before deleting each file. |
| Force the deletion, ignoring any errors or warnings. |
| Recursively remove a
directory and its contents. Use with caution, especially if
combined with the |
[5] A file removed by rm
can theoretically be recovered by an undelete program. To remove
a file more permanently, say, in a high-security environment,
use the srm command instead.
See man srm for
details.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access