17

When I double click a dmg file it's mounted (or so I assume) in the filesystem. I want to explore the dmg file in the terminal for hidden files (like the background for example), but I'm not sure where it's mounted - I checked /media and /mnt, but it's not there.

  • 4
    I don't use OSX, but can you not type mount in the terminal to see all mounted "volumes" – user606723 Dec 30 '11 at 20:28
  • @user606723 Yes, you can use mount. It shows the volumes that are mounted, their mount points, how they're formatted, etc. – Nathan Greenstein Dec 31 '11 at 22:00
26

All volumes, including DMGs, are mounted in /Volumes.

You can get a list of mounted volumes by typing ls /Volumes in Terminal.

You can navigate to a Disk Image using cd /Volumes/nameOfImage.

  • 11
    You can also drag files and folders from the Finder into a Terminal window, and it'll paste in their path(s). This is an easy way to find out where something's mounted in the unix filesystem. – Gordon Davisson Dec 30 '11 at 17:09
  • 1
    You can also drag them to the spotlight search box and it'll expand the full path there. – sholsinger Jan 5 '12 at 17:16
  • 1
    Actually, you can get a list of mounted volumes by typing mount in Terminal. Some volumes may be mounted outside of /Volumes (like FileVault) and not everything under /Volumes has to be a volume. (It should be, but sometimes normal directories get created under there) – Josh Jan 6 '12 at 13:22

You must log in to answer this question.

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