• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. Using Basic Unix Commands > Removing Files or Directories

Removing Files or Directories

UNIX not only gives you ability to create items such as directories, it also gives you the ability on the opposite side of the coin, to remove (delete) files and directories. You would expect to see a word of caution at this point. When you remove files using UNIX commands there are no pre-warning boxes or other alert messages, which you can say No to. When you remove a file or folder, it's permanent, there's no undo operation. So a word to the wise—be careful when using the rm (remove) command. If you use the srm (secure removal) command without the s or m flags, the terminal performs a strong removal by erasing over the deleted data with various junk data thirty five times.

Remove Files

Open the Applications folder, double-click the Utilities folder, and then double-click the Terminal icon.

Type rm ~/filename.ext, and then press Return.

In our example, UNIX removes the file macOldConf.

Click the Close button.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint