User Tools

Site Tools

Please note, that this is an old archived version of this site. Check out the new version at!

Compare directories

For each of the directories, generate a digest file:

find DIR -type f -exec shasum {} + | LC_ALL=C sort -d -k 2 > shasums.txt

It's important to use LC_ALL=C and the option -d of sort, to get compareable results on different machines.

After that, you can diff the two shasums.txt:

diff shasums1.txt shasums2.txt

Or you use Meld as graphical diff tool:

meld shasums1.txt shasums2.txt

cli sysadmin

info/script/compare_directories.txt · Last modified: 2018-09-19 12:34 by andunix