Alex Rivera | Logout

Creating DMG without extra space

Asked 2012-01-10T17:51:48.300
8

I currently use hdiutil to create my DMGs.

The command I use is hdiutil create -size xxxg myImage.dmg -fs HFS+. I'm always left fidgeting around with the size until I get it close enough.

Is there a better method that either shrinks the DMG to size or creates it size?

Edit
Report

1 Answer

6

Yes:

hdiutil create myImage.dmg -srcfolder SourceDir

This will automatically size the image to fit.

answered 2012-01-10T18:03:38.573

Your Answer