Do you want to delete files from the Terminal in Mac OS X? Well, In many cases you may notice that the folders or files available in your Mac OS X will not delete using the standard method. In this case you can delete these files by using the Terminal in Mac OS X. Simply follow the step by step instructions posted below using which you will be able to delete files by using terminal in your Mac OS X.
STEP 1. First you have to launch “Terminal” application. For this, open Finder window then go to Application/Utilities/Terminal and then double click the Terminal application icon.
STEP 2. Now you have to type the command given below:
sudo rm –f
STEP 3. After the end of the above command leave an extra space, following the “R.” In order to delete a folder simply type: sudo rm –rf
STEP 4. Now simply Drag and drop the file onto the Terminal window to delete it.
That’s it. In this way you can delete files using Terminal in Mac OS X. You can delete multiple files by simply dragging and dropping multiple files onto the Terminal window. You should careful before deleting files using this method because the deleted files can not be recovered.