Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

truth1ness

macrumors regular
Original poster
May 8, 2011
109
4
I want to send a bunch of files over wifi but I'm not sure if OSX does any kind of error checking/failure notification when simply dragging the files to a remote network drive. I've sent big files that were cut off and there was no error warning. What's the best (but still easy) way to do this and ensure the files' integrity?

ps keep in mind it's usually a few folders worth of files. Going through each file with a checksum application and manually comparing is too tedious as I need to do this fairly regularly.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
1. Compress entire folder of files on source Mac.
2. Calculate checksum on resulting zip file.
3. Copy zip file to target Mac.
4. Calculate checksum on received zip file, from target Mac.
5. Decompress zip file.

There are other approaches. This is a fairly easy one.
 

truth1ness

macrumors regular
Original poster
May 8, 2011
109
4
Nice, thanks. Would simply putting the files into a DMG, ISO or some kind of package file accomplish the same thing without having to wait for it all to get compressed?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
Nice, thanks. Would simply putting the files into a DMG, ISO or some kind of package file accomplish the same thing without having to wait for it all to get compressed?

Those would work, but you should test whether they're faster than zipping. It may be that disk I/O is the slowest part, copying data to an uncompressed DMG will write the same amount of data as the original files. This could take longer than compression, which writes less data by nature.

I also second what dyt1983 wrote about transferring large files over an unreliable connection.

If you can't directly address the connection's reliability, consider a sync program. Look for one in the Mac App store. I have no recommendation, but there should be plenty of candidates.

Finally, consider whether the problem may lie with your "network drive". You gave no info about it, but if it's causing the problem, there's not much the source Mac can do to remedy that. At best, it can detect failures and resend, but ultimately the target needs a minimum level of reliability.
 

truth1ness

macrumors regular
Original poster
May 8, 2011
109
4
Cool, thanks for the help guys.

I'm simply transferring to another mac's hard drive. Overall reliability of file transfers has been good, I've only had an issue once or twice where I checked the transferred file and a little chunk was missing and OSX hadn't thrown an error. This was a few OS's ago so maybe error checking has been added but until I'm sure I just want an extra layer of verification as this incident has been on my mind ever since. I would have lost a lot of data if I deleted the original copy thinking that OSX would have thrown an error if something went wrong.

So the DMG route (I'm using a sparseimage b/c of its dynamic sizing) is quite a bit faster than Mac's built in Zip. For my 35gb set of files it's 8 minutes vs 30 minutes (plus zip extraction time on the other side you don't have with a dmg).

I think all DMG's include a checksum. If you do a google search for "dmg checksum" you'll see a lot of help threads asking about an "Invalid Checksum" error when trying to open a downloaded DMG, so in theory a DMG should have the same integrity as a Zip and not need an external checksum, right?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,740
8,416
A sea of green
I think all DMG's include a checksum. If you do a google search for "dmg checksum" you'll see a lot of help threads asking about an "Invalid Checksum" error when trying to open a downloaded DMG, so in theory a DMG should have the same integrity as a Zip and not need an external checksum, right?

I wasn't sure that every DMG has a checksum, and suspected they didn't, so I had to look it up.

The shell command 'hdiutil' is the command-line interface to the disk-image functionality. Its man page is here:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/hdiutil.1.html

On that man page is this:
verify image [options]
compute the checksum of a "read-only" or "compressed" image and verify it against the value
stored in the image. Read/write images don't contain checksums and thus can't be verified.
verify accepts the common options -encryption, -stdinpass, -srcimagekey, -puppetstrings, and
-plist.
(Red hilite added.)

Based on this, I don't think a read/write DMG has a checksum. You could test this by running the 'hdiutil' command on the target Mac. If you need an exact command-line, just ask.

The reason you see "Checksum errors" on downloaded DMGs is that they're read-only or compressed.

You could produce a checksum by creating the DMG as read-only or compressed, but I suspect that's going to take about the same amount of time as making a zip file. You won't need to unzip on the target Mac, just mount the DMG (which verifies its checksum), and copy the files off the DMG.

The 'hdiutil' command also has a 'checksum' command, which can be performed on any DMG type. You could setup an Automator workflow to do this, show it to you, and then you run the same workflow on the target Mac and manually confirm.

If I were doing this rigmarole more than once a week, I'd definitely look into a sync app that handles it all for me. Even if it's only once a week, I'd probably get sick of it in a couple months and again look for a reliable sync app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.