Tuesday, May 5, 2009

How to ensure the integrity of your VERY LARGE files on AIX

Something that I've learnt by time is that I must check my files - especially big ones - upon transferring them from one medium to another or through a network or you're really going to face troubles that you'll see everyday in your worst nightmares :(. Anyway, it's very simple and quite fast, there are lots of methods available and here are my favourite two:
  1. "csum -h MD5 file_name" #for small files, it's very fast
  2. If the above doesn't work, use this instead "cksum file_name" #For very large files
Both will produce an output for you that will consist of numbers, characters or both, just do this on the source medium and the destination medium (after file transfer) and if the outputs match, the file is healthy, otherwise you must re-transfer the file and re-calculate the sum, Enjoy!


Osama Magdy said...

Thanks Ahmed.
I want to add something to make this post complete ... "Calculating MD5 Sum in Windows :( " using an application called LLMD5Sum (the one you gave me)

* Get LLMD5Sum from this link : http://www.soft32.com/download_187752.html

* Open the application and specify a directory contains file(s) you want to calculate checkSum for them.

* Specify output file (.txt file)

* The output file will contain a line showing MD5 for each file in the directory.

Anonymous said...

nice effort ahmad, keep on