0

I have files saved under Macintosh HD/Library/... that I need to manipulate using bash. How can I access those files in the shell?

2 Answers 2

4

All mounted volumes on OS X are mounted to the "/Volumes" directory. Thus, you would enter this in the terminal:

cd /Volumes/Macintosh\ HD/Library

"\ " indicates a space.

1
  • 1
    Note that if "Macintosh HD" is your system disk then cd /Library should suffice because the root of the system disk is mounted at /. Jun 10, 2012 at 3:49
2

Just adding to upper ans. You can use single quote or double quote. This is sometimes easier to use as you dont have to escape individual space. Ex:

cd "/Volumes/Macintosh HD/Library"
cd '/Volumes/Macintosh HD/Library'

NOTE: If you are on the mac. Pressing TAB key will auto complete your dir names and it will auto escape spaces for you.

You must log in to answer this question.

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