MD5 a directory recursively
Posted by Kelvin on 05 May 2011 at 11:57 am | Tagged as: Ubuntu
Ever need to check if a directory is exactly the same as another (including file contents)?
find . -type f -exec md5sum {} + | awk '{print $1}' | sort | md5sum
This runs md5sum on the individual md5sum hashes of each file.
And if you need to exclude a directory from the comparison:
find . -type f -exec md5sum {} + | grep -v dirtoexclude | awk '{print $1}' | sort | md5sum
- Introducing Bash-whacking
- Recursively delete .svn folders
- Move up multiple directories in bash
- Download youtube videos as mp3
- Useful ffmpeg commands
- Recursively copy only files with certain extension with rsync
- Recursive directory listing sorted by file size
- Download google video and youtube from command-line
- Reset wireless in Ubuntu 10.04 Lucid
- Delete files older than x days
- MD5 a directory recursively
- Convert fixed-width file to CSV
- Recursively find the n latest modified files in a directory
- Using sed to delete lines from a file
- Determine if a server supports Gzip compression
- Delete directories older than x days
- Mount a .dmg file in Ubuntu
- Batch convert svg to png in Ubuntu
- Split wav/flac/ape files with cue