eHow launches Android app: Get the best of eHow on the go.

How To

How to Delete Files Using the Terminal in Mac OS X

Contributor
By John Ford
eHow Contributing Writer
Mac OS X Terminal Application
Mac OS X Terminal Application
John Ford: Apple Computer

You can delete files and folders directly from within the Terminal in Mac OS X. There are times when troublesome files and folders will not delete using the standard method of moving them to the trash and then emptying your user trash. Learn how to delete files using the Terminal in Mac OS X.

Difficulty: Moderately Easy
Instructions
  1. Step 1
    The terminal application in your utilities folder
    The terminal application in your utilities folder

    In an open Finder window, navigate to “Application/Utilities/ Terminal” and double-click the Terminal application to launch it.

  2. Step 2
    The command in an open terminal window
    The command in an open terminal window

    In an open terminal window type in the following command: sudo rm –f Leave an extra space after the end of the above command, following the “R.” To delete a folder, type in “sudo rm –rf” without the quotes.

  3. Step 3
    Drag and drop the file you wish to delete to the terminal window
    Drag and drop the file you wish to delete to the terminal window

    Drag and drop the file(s) you wish to delete onto the open terminal window from Step 3. The files you drop on the terminal window will be deleted. You can drag and drop multiple files and folders onto the terminal window.

Tips & Warnings
  • Be extra careful with the files you are deleting using this method. You are deleting the files using a “Super User” command. Deletion of files and folders using this method cannot be undone.
Subscribe

Post a Comment

Post a Comment

Related Ads

  • Have you done this? Click here to let us know.
I Did This
Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

eHow Computers
eHow_eHow Technology and Electronics