How do you reference a file on an external drive on a mac from a script command?
8,627
The mount points are under /Volumes
. This includes the startup disk, which is a link back to /
. Therefore if the removable disk shows up in Finder as "Untitled", you'll probably find it at
/Volumes/Untitled
Here's what the contents of my /Volumes looks like when I have an unnamed flash drive connected.
$ ls -la /Volumes
total 40
drwxr-xr-x@ 6 root wheel 204 27 Mar 23:34 .
drwxr-xr-x 41 root wheel 1462 22 Mar 22:17 ..
drwxrwxrwx@ 1 grgarside staff 8192 22 Aug 2016 Untitled
lrwxr-xr-x 1 root wheel 1 21 Mar 14:17 Mac SSD -> /
drwxrwxrwx 0 root wheel 0 27 Mar 23:34 MobileBackups
Related videos on Youtube
Author by
Ravindra Bawane
Updated on September 18, 2022Comments
-
Ravindra Bawane over 1 year
If this is what I want in PC land F:\new\home\dir
What is the equivalent on a Mac? I just see the external drive called untitled. What is its path for a script command please?
-
Admin about 7 yearsThis question most likely belongs in the think different forum instead.
-
Admin about 7 yearsAre you trying to create directories in this path? Are you trying to change the user home directory? Are you just trying to navigate to this path in the command prompt? As it is worded currently, it is difficult to tell what exactly you are asking.
-
Admin about 7 years@VirtualHat Assuming OP is just trying to navigate to the path, it is likely on-topic here because Macs are also PCs. It's a bit of a grey area frankly. As the question is clarified it may become more apparent whether or not it belongs one place or another.
-