Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the best way to change drives through command line on a mac?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

What do you mean by change drives?

If you mean changing directory so that you can use the files on an external drive, they're mounted in /Volumes, so if you wanted to work in the root of a disk called Foo, you'd go cd /Volumes/Foo.

If you mean ejecting a drive so you can unplug it, hdiutil unmount /Volumes/[drive name] is what you want, so to unmount a disk called Foo, you'd go hdiutil unmount /Volumes/Foo.

share|improve this answer
1  
There is no such thing as drive letters, one working directory per drive and the need to type e.g. C: on Mac OS X, as there is on Windows. –  Daniel Beck Jan 24 '11 at 10:35
    
I'm not sure where you got the idea that I was talking about drive letters - hopefully things are clearer now. –  Scott Jan 24 '11 at 10:42
    
Sorry, meant that as an addition, as I suspect this concept caused the user's confusion (but your edit is useful anyway). If you reply to comments, please use @-syntax, e.g. @DanielBeck or @Daniel, so the user you reply to gets a notification. –  Daniel Beck Jan 24 '11 at 10:45

You don't; you just go to another mounted volume.

cd /Volumes/"Some Volume Name Here"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.