7

I want to delete a folder of portable hard drive on terminal in Mac. Are there any command line ?

1
  • Do you mean you want to unmount (that is, no longer show the portable hard drive as being connected) or to delete a folder on the portable harddisk?
    – l0b0
    Sep 22, 2012 at 8:31

1 Answer 1

17

You can use rm to remove the folder on your external hard drive.

The full Terminal command looks like this

rm -r /Volumes/$drivename/$folder

Replace $drivename with the name of your external hard drive.
Replace $folder with the name of your folder.

If you don't know the name of your external hard drive you can look it up with

ls /Volumes
1
  • Thanks, I wasn't aware of which folder to find the external hard drive under :)
    – a7omiton
    Dec 28, 2014 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .