Ftp – How to verify integrity of a remote file transfer

data integrityftp

Is there any way I can verify the integrity of a remotely transferred file? I am currently transferring a large amount of files and folders from an ftp server to another remote server using wget, but I have no way of knowing if the files are corrupt.
Is there any way I can verify the integrity of the transfer, by getting something like the MD5 hash of the remote files? Is there any other file transfer protocol that supports this?

Best Answer

Depending on the tool you use it's possible to automatically hash and verify the downloaded files, the only tool that can do this that comes to mind immediately though is the DownThemAll! addon for Firefox.

What I normally use for situations like this a hash manifest file created by md5deep on Windows, you can use md5sum if you use Linux/UNIX or md5 on OS X. Using md5deep I CD to the folder containing the files to be transferred and run the command:

md5deep -l -r *>manifest.md5

On the remote end after transferring the files and manifest you would run the command:

md5deep -l -r -x manifest.md5 *

And it will show a list of every file that DOES NOT match the hash value in the manifest.

Related Topic