Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 30545  / 1 Year ago, thu, december 22, 2022, 6:03:51

I have two folders having in theory an identical folder structure and the same files.



I wish to check for differences between the two copies in the two folders. I can run diff folder1/file1 folder2/file1 one by one but this is time consuming.



Is there a way to identify which are the files which differ in the two folders? If not is there at least a way to compare the contents of a folder with the contents of the second folder?


More From » batch

 Answers
1

You've missed the -r (recursive) option to diff:



diff -r folder1 folder2


For a concise output also add the -q flag; it will only output that the files differ, but doesn't output the actual differences. See the manpage (man 1 diff) for more information and options.


[#32971] Friday, December 23, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oatglori

Total Points: 313
Total Questions: 102
Total Answers: 111

Location: Guam
Member since Thu, May 18, 2023
1 Year ago
oatglori questions
;