Compare two folders on Terminal

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

Open the Terminal.app (/Applications/Utilities/Terminal.app)
Run

diff -rq folder1 folder2

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

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