Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Store files securely on a USB flash drive' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Store files securely on a USB flash drive
Authored by: azraq27 on Aug 05, '06 10:43:42PM

I haven't done this in a while, so I'm sorry if I'm not getting the details here correct:

In my experience with sparse disk images, they start out very small, then grow to the max size you set at the start. Convenient, but the problem is that when you delete all of the contents inside the sparse image, they never shrink back down in size.

So, effectively, after you have filled your USB drive once, you will have a disk image which is permanently the full size of your USB drive. This still works, but I'd be more inclined to start out with a fixed-size disk image to begin with, if that's where I'm going to end up anyway. I'd guess the sparse format would be less efficient, but I don't know.

[ Reply to This | # ]
Store files securely on a USB flash drive
Authored by: BrentT on Aug 07, '06 05:21:28AM
You're right. Perhaps a simpler method for this hint is to:
#1. In Disk Utility, choose File -> New -> Blank Disk Image.
#2. Select a size that is less than the flash drive's maximum size, then select Encryption -> AES-128, then select Format -> read/write disk image. Select Create, you will then be asked for a password. Provide the password and save the image to your hard drive.
#3. Copy the file secure-disk-name.dmg to the USB drive.

[ Reply to This | # ]
Store files securely on a USB flash drive
Authored by: on Aug 08, '06 12:11:25AM

I had the same experience with a sparse image growing even after deleting files.

Even though Mac OS X has this feature which is used with File Vault, Disk Utility doesn't have an option to compact a sparse image so I wrote the following script that when saved as an applicaton works great to compact a sparse image. Just drag and drop a closed sparseimage over the application.


set |warning| to display dialog
"To use this script, drag a Sparse Image over it." buttons {"OK"} default button 1

on open this_item
set this_item to quoted form of POSIX path of this_item
set Question to display dialog
"Would you like to compact this Sparse Image?" buttons {"Cancel", "Compact"} default button 1
if button returned of Question is "Compact" then
do shell script "hdiutil compact " & this_item
set dialog to display dialog
"Your Sparse Image has successfully been compacted." buttons {"OK"} default button 1
end if
on error the errMsg number the errNmb
if the errNmb is not 0 then

display dialog
"Please unmount the Sparse Image before compacting." buttons {"Cancel"} default button 1
end if

end try
end open

[ Reply to This | # ]
Store files securely on a USB flash drive
Authored by: on Aug 08, '06 12:36:53AM
To make it easier I put the script here

[ Reply to This | # ]