1751879 Members
5180 Online
108782 Solutions
New Discussion юеВ

Verify copy completed OK

 
SOLVED
Go to solution
JianW
Occasional Advisor

Verify copy completed OK

Hi,
I do cp of single .tar file (or scp) between Unix-to-Unix boxes. And need to verify how it went counting . That's what I have to do, don't have an option to argue, despite I'm doing md5 check.

so I'm thinking how to do it better and compact, the only idea I have to create file on source < ls -l file_mask* | wc - l and then do the same on target after tar -x. and compare those values from both files.

Will appreciate your opinion.
Tx
J
P.S. Overall on you practice after cp or scp between Unix boxes do we need to do any extra vlaidation or we can expect that we get some system error msg if something goes wrong.

Tx again
j
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: Verify copy completed OK

Hi:

Comparing the 'md5dum' for the source and destination 'tar' file should be your strongest integrity check following a copy operation. You could run 'md5sum' with the '-k' option to -k option to generate a three-column value of the hash, file-size and file name.

Regards!

...JRF...

Steven E. Protter
Exalted Contributor

Re: Verify copy completed OK

Shalom,

md5dum

Does not ship with the OS.

It is available I think at http://software.hp.com
or

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/md5-1.00/


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Viktor Balogh
Honored Contributor

Re: Verify copy completed OK

>And need to verify how it went counting .
>That's what I have to do, don't have an option to argue, despite I'm doing md5 check.

Yepp, md5sum is the rock-solid solution for integrity checking. But ok, so you were told by some manager to count the number of files. In this case I would try to run "tar -tvf" and count the output lines with " | wc -l" on both sides and see if there's any difference.

****
Unix operates with beer.