Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Command to double-check backup's validity?

Command to double-check backup's validity?
Thread Tools
Mac Elite
Join Date: Jul 2001
Status: Offline
Reply With Quote
Jun 10, 2003, 06:16 PM
 
Is there a way to either:
1) while my Mac is copying something from my internal HD to a FW HD, make it read the new file on the FW and compare it to make sure it's exactly the same?
or
2) after it's been copied, run a comparision check which will tell me what's different and needs to be recopied?

Some of you may remember my MP3 degradation thread. Let's just assume I'm a fanatic about consistency and not talk about the merits of the digital encoding.

I imagine that this is already done in the background, but please, reassure me.
Actual conversation between UCLA and Stanford during a login on early Internet - U: I'm going to type an L! Did you get an L? S: I got one-one-four. L! U:Did you get the O? S: One-one-seven. U: <types G> S: The computer just crashed.
     
Dedicated MacNNer
Join Date: Feb 2001
Location: Alaska
Status: Offline
Reply With Quote
Jun 10, 2003, 06:43 PM
 
You could compare afterwords with a diff. In the terminal type diff -r dir1 dir2 and it'll report the different files in the directory.
     
Mac Enthusiast
Join Date: Jul 2002
Location: Leiden, Netherlands
Status: Offline
Reply With Quote
Jun 11, 2003, 03:00 AM
 
Originally posted by cdhostage:

2) after it's been copied, run a comparision check which will tell me what's different and needs to be recopied?
Yes it's called sum or cksum on the command line. You need to run something like that :
Code:
#!/bin/ksh ORIG_DIR='/home/path/path2' CPID_DIR='/files/copied' for i in $ORIG_DIR/* do cd $ORIG_DIR j=`basename $i` orig_file=`cksum $j` cd $CPID_DIR cpid_file=`cksum $j` if [[ $orig_file -ne $cpid_file ]] then echo "file $j is not correctly copied" fi done

hope this helps.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:31 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2