Thursday, April 14, 2016

How can I access an USB external drive in my Mac's terminal?

While writing some bash scripts, I ran into this question. Although I was familiar with accessing the contents on external drives I connect to my Macbook Pro with OSX, I never needed to access them from a terminal shell.

The USB pen drive I want to access via terminal

It took me a few minutes to find out how to do it. The complete solution took two steps, although I just needed the second one:

  1. execute the command df -h to find out where every volume is mounted;
  2. change to the proper directory in /Volumes, were all drives (internal, external and networked) get mounted.
Simple, uhh?

1 comment:

Unknown said...

Thanks for sharing to this post. It’s an important asset for my students who have no clue where to begin concerning writing a dissertation.Keep doing awesome.Dissertation Writers UK