Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer

If you have a lot of files and subfolders, you'll probably want to use meld (apt-get install meld), which is a visual diff and merge tool.

share|improve this answer
1  
Meld is one example of a GUI diff tool (good one). There's also Kompare, QDiff, etc. –  gertvdijk Jan 28 '13 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.