Get MD5 checksum for all files in my account

software development


I’m not much of a linux / php guy, so I’m hoping someone can help me with this.

I had a problem on my (Windows) system at home where some of my files have been lost and/or corrupted. There’s no easy way to know which ones are corrupted except to try and open them - they are a variety of different file types.

Luckily I have the files backed up at dreamhost, but would rather not download dozens of gigs. Does anyone know of an easy way I could get a list of all files in my account with the MD5 checksum? I could then write a script to do the same at home (I’m much better with Windows) and highlight the missing / different ones.

Not sure if there’s some built in shell way I could do this, or if it’s a scripting job.



In the shell, check out the for the md5sum program. It takes file names as its list of parameters and will output an MD5 hash for each file you provide it. You can provide the file names in pretty much any way you can think of – by hand, using shell wildcards, backtick-running find, etc.

Unfortunately, I don’t know of a comparable utility on Windows, since I don’t really use that OS much. Someone else probably does, though.


Thanks, the Windows side I can handle as that’s where my experience is.

Anyone want to take a stab at a script that will recursively go through a folder and calculate the MD5 of every file, and write it to a single text file? I’m afraid I wouldn’t even know where to start :frowning:



Wow I think I answered my own question … found this thanks to Google:

find $@ ! -type d -print0 | xargs -0 md5sum -b > md5.txt

It seems to work great! Unix is tres elegant :slight_smile:


Here’s a handy Windoze app that’ll check recursively and can save results to file.

Maximum Cash Discount on any plan with MAXCASH