Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Mounted Disk Image is significantly smaller than .dmg
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="vansmith" data-source="post: 867469" data-attributes="member: 71075"><p>You can pass the -srcfolder option, which will create an image that contains the folder and calculates the required size for you. This will help you to avoid having to calculate a size. So, for instance, the following should create an image for you with you not having to worry about passing a size:</p><p>[CODE]hdiutil create -srcfolder <folder> -volname "Converted Clips" converted_clips.dmg[/CODE](Replace <folder> with the name of the folder). You also don't need to pass the -fs parameter as it is redundant (the image will take the fs of the folder).</p><p></p><p>From the hdituil man page for the -srcfolder parameter: "<strong>Derive the image size from the the filesystem entity source and copy the contents of source to the resulting image. The filesystem type of the image volume will match that of the source as closely as possible unless overridden with -fs</strong>. Other size specifiers, such as -size, will override the default (size of the source directory plus some padding for filesystem overhead), allowing for more or less free space in the resulting filesystem. -srcfolder copies file by file, creating a fresh (theoretically defragmented) filesystem on the destination image." (important parts bolded).</p></blockquote><p></p>
[QUOTE="vansmith, post: 867469, member: 71075"] You can pass the -srcfolder option, which will create an image that contains the folder and calculates the required size for you. This will help you to avoid having to calculate a size. So, for instance, the following should create an image for you with you not having to worry about passing a size: [CODE]hdiutil create -srcfolder <folder> -volname "Converted Clips" converted_clips.dmg[/CODE](Replace <folder> with the name of the folder). You also don't need to pass the -fs parameter as it is redundant (the image will take the fs of the folder). From the hdituil man page for the -srcfolder parameter: "[B]Derive the image size from the the filesystem entity source and copy the contents of source to the resulting image. The filesystem type of the image volume will match that of the source as closely as possible unless overridden with -fs[/B]. Other size specifiers, such as -size, will override the default (size of the source directory plus some padding for filesystem overhead), allowing for more or less free space in the resulting filesystem. -srcfolder copies file by file, creating a fresh (theoretically defragmented) filesystem on the destination image." (important parts bolded). [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Mounted Disk Image is significantly smaller than .dmg
Top