Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have uploaded an ISO file to my server via rsync. How can I verify it is correct (Not corrupted or something). This is just in case rsync had an problem.

share|improve this question
Luis - do a man rsync and search for "checksum"... if i've interpreted that correctly, rsync automatically does a checksum for files sent... – fossfreedom Dec 24 '11 at 20:52
@fossfreedom - Yes it does but just to double check. Actually it is one of the main reasons I use rsync but you know... just in case all hell break loose and I see a pig or two flying then I want a double check. – Luis Alvarado Dec 24 '11 at 21:15
up vote 2 down vote accepted

One way to do this would be to use md5sum to compute a message digest before sending the file, then do it again on the receiving end, and make sure the hashes match.

$ md5sum

Alternately, with an eye towards doing this in a shell script, you could redirect the output of the initial md5sum into a file, send the original file and the file with the message digest to the remote host, and run md5sum on the file with the message digest. You'll often see such files listed on FTP sites along with Linux distribution disk images.

$ md5sum > md5sum.txt
$ rsync remotehost:/home/user
$ rsync md5sum.txt remotehost:/home/user
$ ssh remotehost 'md5sum -c md5sum.txt' OK
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.