hdiutil create ufs_tmp -volname tmp -size 3000m -fs UFS
where "ufs_tmp" is the name of the file you want to create on disk, "tmp" is the name the file system will be mounted as, and "3000m" is the size of filesystem to create (in this case 3 gigabytes, approximately).
hdiutil attach ufs_tmp.dmg -readwrite
hdiutil detach `hdid cvs.dmg | perl -pe 's@^(/dev/disk\d+).*@$1@' | sort -u`
this last bit (in the back-ticks) is just figuring out what device to unmount. You can cut and paste the back-ticked portion in a terminal to see what it's picking up. As an alternative, you could run 'df', figure out which device the file is mounted as, and then just tell hdiutil to detatch that device.
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.