LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Comparing two directories and its contents (http://www.linuxquestions.org/questions/linux-general-1/comparing-two-directories-and-its-contents-4175439436/)

depam 11-30-2012 07:52 AM

Comparing two directories and its contents
 
Is there a way to compare two directories? My objective is to compare two directories and identify files that are on one directory and is missing on the other one. The next thing I want to do is to compare the text files recursively on two directories.

linosaurusroot 11-30-2012 07:57 AM

http://linux.about.com/library/cmd/blcmdl1_diff.htm

allend 11-30-2012 07:59 AM

Perhaps 'diff dir1 dir2'?
Note - diff also takes -r option for recursion

Habitual 11-30-2012 08:03 AM

Code:

diff --brief --recursive --report-identical-files /folder1 /folder2
Alternate:
Code:

diff -qr /somedir/ /someotherdir/
http://www.bournetoraiseshell.com/ar...20903112827690

depam 01-25-2013 11:41 PM

Thanks this is really helpful


All times are GMT -5. The time now is 08:56 AM.