linux compare two directories code example
Example 1: directory diff
diff -qr dir1/ dir2/
Example 2: how to compare two directories in linux
# -q switch tells diff to report only when files differ
$ diff -q directory-1/ directory-2/
diff -qr dir1/ dir2/
# -q switch tells diff to report only when files differ
$ diff -q directory-1/ directory-2/