Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

verifying ftp'd files

Status
Not open for further replies.

eanda10

Programmer
Apr 9, 2002
141
US
I use ftp to transfer files from my sco machine that does not support ssh to my linux box how can I verify the data that I ftp'd bec. these are mission critical files that I am ftping
I can't wait till I fully migrate on to linux!!!!!!!!!!!
 
example original filename="file.tar.gz"

command 'md5sum file.tar.gz' on originating server generates output

234098e098a0982398a00e00c0 file.tar.gz

Store or record that string. It is common to store the file as "file.tar.gz.md5sum" or "file.tar.gz.asc". This could be downloaded with the file itself.

On the other server, when you FTP the file, run md5sum against the new copy. If the md5sum matches exactly, then you are happy. If not exact match, you are sad.

I believe you can even use the "diff" command to compare the "file.tar.gz.asc" file contents with `md5 file.tar.gz` on the new copy...

'diff file.tar.gz.asc `md5sum file.tar.gz`'

If diff sees no difference in the reported md5 values, then you're home free.

There are probably other ways, but most unix/linux heads will recognize this.... it's done on kernel.org's distributions and CPAN.





Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top