Jan 29 2009
A nice shell command to diff two folders
Today, while working, I had to take “diff” of each folder and found the following command. Works perfectly on macOSx shell, should work in linux shell too.
diff -qr dirA dirB | grep -v -e ‘DS_Store’ -e ‘Thumbs’ | sort
here, DS_Store and Thumbs are two folders you want to exclude. The output looks like:
Files ./dirA/File1 and ./dirB/File1 differ
Files ./dirA/File2 and ./dirB/File2 differ
…

