Re: cp --verify?

2007-10-29 Thread Lowell Gilbert
Steve Franks [EMAIL PROTECTED] writes:

 I don't see a --verify switch on cp, so I presume it does not.  Is
 there an automated way to ensure a copy has gone well byte-for-byte
 without writing a script to filter diff?  I want to be relatively sure
 my family pics are in the destination and not currupted before I wipe
 my flash card - got burned by ms windows on that bigtime last year...

I like to use mtree(1) for this.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cp --verify?

2007-10-28 Thread Rob

Steve Franks wrote:

I don't see a --verify switch on cp, so I presume it does not.  Is
there an automated way to ensure a copy has gone well byte-for-byte
without writing a script to filter diff?  I want to be relatively sure


If you use the diff command and specify directories, it will compare the 
contents of each, as well as comparing all the files byte for byte. 
Check man diff -- there should also be an option to check down through 
any subdirectories as well.


  -Rob

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cp --verify?

2007-10-28 Thread James
On 10/28/07, Steve Franks [EMAIL PROTECTED] wrote:

 I don't see a --verify switch on cp, so I presume it does not.  Is
 there an automated way to ensure a copy has gone well byte-for-byte
 without writing a script to filter diff?  I want to be relatively sure
 my family pics are in the destination and not currupted before I wipe
 my flash card - got burned by ms windows on that bigtime last year...

 Steve
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]

cd /usr/ports/net/rsync
make install clean
rehash
man rsync

rsync -cav sourcefiles destfiles

http://en.wikipedia.org/wiki/Rsync

rsync is one of the great programs to discover.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: cp --verify?

2007-10-28 Thread Peter Schuller
 cd /usr/ports/net/rsync
 make install clean
 rehash
 man rsync
 
 rsync -cav sourcefiles destfiles
 
 http://en.wikipedia.org/wiki/Rsync
 
 rsync is one of the great programs to discover.

Note that one will have to run it twice; the first time to copy and
the second time to verify that rsync does not want to update any files
there (if it did it would be an indication of corruption). -c makes it
checksum regardless of whether the file size/ctime matches, but it
will not make it re-do the checksumming after an update.

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller [EMAIL PROTECTED]'
Key retrieval: Send an E-Mail to [EMAIL PROTECTED]
E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org



pgpHF8ZZI7HBx.pgp
Description: PGP signature