Under Linux, how to compare the contents of two folders?
Under Linux, one can compare the content of two folder with the diff command:
diff -qr folder_1/ folder_2/
The -q (brief) option displays only differences (prevent similar files to be displayed).
The -r (recursive) option also compare sub-folders.
By removing the q option, you can have a file-by-file breakdown of the difference between the two files:
diff -r dossier1 dossier2 | sort
Under Linux, one can compare the content of two folder with the diff command:
diff -qr folder_1/ folder_2/
The -q (brief) option displays only differences (prevent similar files to be displayed).
The -r (recursive) option also compare sub-folders.
By removing the q option, you can have a file-by-file breakdown of the difference between the two files:
diff -r dossier1 dossier2 | sort
Under Linux, one can compare the content of two folder with the diff command:
diff -qr folder_1/ folder_2/
The -q (brief) option displays only differences (prevent similar files to be displayed).
The -r (recursive) option also compare sub-folders.
| # | ID | Query | URL | Count |
|---|---|---|---|---|
| 0 | 11899 | en | https://en.ans.wiki/6447/under-linux-how-to-compare-the-contents-of-two-folders | 6 |