Normally I use meld
to compare folders, however, it is not handy when a folder has many subfolders, because I have to click into each subfolder to see if there is any difference.
Is there a tool to compare folder that displays differences only?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityA command line diff will do this, and a little grep would get you a list of different files, e.g.:
diff -r dir1 dir2 | grep -e "Only|diff"
Could obviously be improved . . .
For a nice visual side-by-side comparison I like to use two files of md5 checksums and vimdiff.
This has the added bonus of being to easy to compare two directories on two different servers.
It only shows you which files are different, not the internal differences.
To compare the /etc/ directories on servers sr1 and sr2:
(On first server:)
for i in (find /etc/ -print); do md5sum $i; done | awk '{print $2 "\t" $1}' | sort >
~/tmp/etc-sr1.txt
(on second server:)
for i in (find /etc/ -print); do md5sum $i; done | awk '{print $2 "\t" $1}' | sort >
~/tmp/etc-sr2.txt
scp ~/tmp/etc-sr2.txt sr1:tmp/etc-sr2.txt
(On first server:)
vimdiff ~/tmp/etc-sr1.txt ~/tmp/etc-sr2.txt