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 identical folders, but the are not identical(for example Java installation dir). One dir has one extra file and one file has been changed.

Is there any easy to use tool to check that or do I have to write complicated bash script for that?

P.S. I'm looking for command-line tool, but if you know any GUI tools please share the knowledge.

share|improve this question

3 Answers 3

up vote 9 down vote accepted
diff -qr dir1 dir2 | sort

That will compare files in two directories.

If you're a sadist you can drop the q argument (and the | sort pipe) and you'll see all the differences between all the files... But the output is pretty hard to interpret like that.

If you do have a lot to handle, perhaps piping through less (just add | less to the command) will let you view it a little easier.

share|improve this answer

meld is a good graphical diff frontend that will show you a side-by side listing of files. Install meld with Ubuntu Software Center:

Install via the software center

Or use these commands with the terminal:

sudo apt-get install meld
meld dir1 dir2

meld in action

share|improve this answer

As to GUI, kdiff3 seems to be able to compare directories.

share|improve this answer
    
isnt it only for KDE? –  UAdapter Jan 7 '11 at 17:36
    
The program uses QT and the KDE libraries. That means that those libraries need to be installed, but not that the entire KDE desktop must be present. Like all other programs based on those libraries, kdiff3 works without problems on GNOME or other desktop environments. –  loevborg Jan 8 '11 at 11:24

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.