hdiutil notes: Difference between revisions

From ihaveahax's Site
Jump to navigationJump to search
→‎Create a RAM drive: somehow i fucked up the grammar here
No edit summary
(→‎Create a RAM drive: somehow i fucked up the grammar here)
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
Create a {{iw|wikipedia|RAM drive}}. The value is the amount of 512-byte sectors, so 8388608 * 512 = 4294967296 or 4.0 GiB.
Create a {{iw|wikipedia|RAM drive}}. The value is the amount of 512-byte sectors, so 8388608 * 512 = 4294967296 or 4.0 GiB.


The drive is not pre-formatted, therefore <code>-nomount</code> is required, or else hdiutil will newly-created drive will be scanned for partitions, find none because it's completely blank, and cancel attaching.
The drive is not pre-formatted, therefore <code>-nomount</code> is required, or else hdiutil will scan the newly-created drive for partitions, find none because it's completely blank, and cancel attaching.
<pre>
<pre>
hdiutil attach -nomount ram://8388608
hdiutil attach -nomount ram://8388608
Line 65: Line 65:


== <tt>create -srcfolder</tt> doesn't preserve creation time ==
== <tt>create -srcfolder</tt> doesn't preserve creation time ==
Still does this as of Monterey. Creation time is reset to modified time. This isn't really an issue unless you're like me and want to preserve as much info as possible.
Still does this as of Ventura. Creation time is reset to modified time. This isn't really an issue unless you're like me and want to preserve as much info as possible.


Currently the only way I found around this is to manually copy the files in Finder. Maybe there's another command-line tool to preserve this data. Either way though, it means the disk image needs to be manually created with the right size.
Currently the only way I found around this is to manually copy the files in Finder. Maybe there's another command-line tool to preserve this data. Either way though, it means the disk image needs to be manually created with the right size.

Navigation menu