Delete Problem Files With Terminal 5

Terminal

Share
Delete Problem Files With Terminal

Hey

Every so often you will come across a file or folder that will just not delete when you try. This quick trick tonight will explain how to delete this problem file using both Terminal and a minimal amount of writing. It will get rid of any file you want. Perfect.

First, open up Terminal and type the following:

sudo rm -R

Note there should be a space at the very end of the command line.

Then drag and drop your files from Finder onto the Terminal window. You can drag as many as you want. When you are finished simply hit return and type your password. You file will promptly be deleted. This will work for any file or folder.

This is a lot quicker than changing all of the settings in the Get Info pane or writing the command by hand. Be careful mind. Any files you do delete you can’t get back unless you have a Time Machine backup of them.

If you want to take your skills with Terminal a bit further I recommend you check out the Terminal Category on this site. If you fancy reading a book there is a couple on Amazon that I regularly see mentioned and recommend, O’reilly Unix Geeks and Unix Under the Hood both are designed for Mac OS X and take Terminal further.


If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips