Removing Files & Directories with rm & rmdir

Unix includes two commands that you can use to delete files and directories: rm (remove) and rmdir (remove directory).

Warning!

  • rm may be the most dangerous command in Unix. Because Unix doesn’t have a Trash that lets you recover mistakenly deleted files, when you delete a file, it’s gone forever.

✓ Tips

  • There are two options that you may want to use with the rm command:

    • -i tells the rm command to ask permission before deleting each file (Figure 24). You must press and then at each prompt to delete ...

Get Mac OS X 10.4 Tiger: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.