How can I get the mount path of a USB device on OSX?

Posted by xastor on Super User See other posts from Super User or by xastor
Published on 2012-05-26T09:09:09Z Indexed on 2012/09/26 9:41 UTC
Read the original article Hit count: 211

Filed under:
|
|
|

I have a backup script that backs up some data to a USB device. The problem I have is that OSX sometimes changes the expected mount path. For example if some file is locked under the expected mount path, OSX mounts it on another path. A USB device named 'BACKUP' can be mounted at /Volumes/BACKUP-1 instead of /Volumes/BACKUP.

Is there a way to finding out the current mount path of a USB device in the OSX Terminal? Something like 'mount_path BACKUP' (command is fake) which would then return '/Volumes/BACKUP-1' or nothing if the device was not mounted?

© Super User or respective owner

Related posts about osx

Related posts about bash