How to compare two directories with the diff command under Linux?
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 |
---|