access external hard drive to delete folder on terminal Mac

33,643

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
Share:
33,643

Related videos on Youtube

cat_minhv0
Author by

cat_minhv0

Updated on September 18, 2022

Comments

  • cat_minhv0
    cat_minhv0 almost 2 years

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

    • Admin
      Admin almost 12 years
      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?
  • a7omiton
    a7omiton over 9 years
    Thanks, I wasn't aware of which folder to find the external hard drive under :)