Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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.

share|improve this question
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

1 Answer 1

up vote 26 down vote accepted

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.

share|improve this answer
10  
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
    
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
    
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

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.