Compare two folders on Terminal

One of the simplest way to compare the folders’ content is to use the diff utility.

Open the (/Applications/Utilities/

diff -rq folder1 folder2

If you want to compare ~/Documents/Oldfolder with ~/Documents/Newfolder,

diff -rq ~/Documents/Oldfolder ~/Documents/Newfolder

Here the r parameter tells the diff to run recursively and q tells it to output the short version of the results.

Be Sociable, Share!
Categories: Tips & Tricks, Unix