Diff files present in two different directories
Solution 1:
You can use the diff
command for that:
diff -bur folder1/ folder2/
This will output a recursive diff that ignore spaces, with a unified context:
- b flag means ignoring whitespace
- u flag means a unified context (3 lines before and after)
- r flag means recursive
Solution 2:
If you are only interested to see the files that differ, you may use:
diff -qr dir_one dir_two | sort
Option "q" will only show the files that differ but not the content that differ, and "sort" will arrange the output alphabetically.