![]() ![]() (It shouldn't be too difficult to adapt it for bash.) The instructions below are for use with the default tcsh shell.(It probably wouldn't be too hard to rewrite this into a script). Since this is really a shell alias with autocompletion, it works on one file at a time.There doesn't seem to be a way around this without sacrificing the shrinking step.) (The disk is copied & converted to a read-write dmg, shrunk, then copied & converted again. Requires at least 2x free disk space of the image, depending on how much unused space is inside the dmg.If the Developer Tools "SetFile" command is installed, the type and creator will be set correctly (so the backup file will still have the correct icon and type-association).When finished, an "ls" command is automatically performed showing only the new and original dmg files, so you can compare the exact byte sizes.The original file is retained, with the suffix ".bak" added.(Use autocompletion or type a "" before each space in the filename.) When you open up the resulting dmg you won't see a huge amount of available space (which looks darn silly on a read-only-compressed disk).This method usually results in slightly smaller dmg files than just recompressing them.Here is a tcsh shell command which will shrink the unused space of a disk image, then compress it with zlib-level 9.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |