Using the shell to create disk-images on OSX.
All these GUI stuff drives me crazy – sometimes. I just wanted to burn a CD during working on my old iBook. Do I really need to install some new program or do I have to use some ‘on-board’ tool and click-here-click-there? Most of you will have installed some tool and you just do a click-and-drop, but I don’t and anyway I am more used to the tools ‘cdrecord’ and ‘mkisofs’ on Linux. Here is how you can create and burn disk-images on OSX with a shell. The shell command for this kind of task is
hdiutil verb [options]
So, this tool can do a lot for you e.g. possible ‘verbs’ are create, convert, burn, etc… I will just write what i did to burn a CD: First I created a new disk-image
hdiutil create -format UDTO -srcfolder folderWithData diskImageWithData.dmg
uhh, and now just burn it!
hdiutil burn diskImageWithData.img
Ok, thats cool. You can also eject, mount and convert disk-images. For example you start with your backup SPARSE disk-image and convert it to a ISO image and the burn it or whatever. Have a look at the man-pages for all verbs and options.