Mac OS X disk images .dmg dmg create creating disk images
From: Tony Lawrence <email@example.com> Subject: Re: Recent switcher Date: Mon, 03 Feb 2003 10:58:40 GMT Pim Versteeg wrote: > Probably a very dumb question ,but... > > Can anyone please give me a pointer towards some information re mounting > (virtual) disks. When I download stuff, all of a sudden I see some (virtual) > disks on my desktop which disappears when I install the apps > > There must be more to this, any assistance would be much appreciated
As others have explained, those are disk image files. What wasn't mentioned is that disk images are easy to create, both graphicallly and from the command line. Disk Copy (Apllications/Utilities) lets you create blank images which you can then double click, copy stuff to etc. Eject by dragging to Trash, then go back to Disk Copy and "Convert" it. Ftom a shell window, the process is a little harder but of course you get more control and you can put it in a script that you call whenever you need it. #/bin/bash # create a 4MB disk image hdiutil create -megabytes 4 myimage.dmg -layout NONE # associate a device with this but don't mount it MYDEV=$(hdid -nomount myimage.dmg) # create a file system newfs_hfs -v Myvol $MYDEV # diassociate device hdiutil eject $MYDEV # mount it hdid myimage.dmg # copy stuff to it /bin/cp /Somefiles /Volumes/Myvol # eject hdiutil eject $MYDEV # compress it and make it read only hdiutil convert -format UDZO myimage.dmg -o mycompimage.dmg
-- Tony Lawrence Free SCO, Mac OS X and Linux Skills Tests: http://aplawrence.com/skillstest.html
Got something to add? Send me email.
(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
Increase ad revenue 50-250% with Ezoic