LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   compare contents of 2 directories (https://www.linuxquestions.org/questions/debian-26/compare-contents-of-2-directories-866724/)

cccc 03-06-2011 05:53 AM

compare contents of 2 directories
 
Hi

Howto compare contents of 2 directories under squeeze?

EricTRA 03-06-2011 06:05 AM

Hello,

You can use the diff command for that.
Code:

man diff
For example:
Code:

diff /home/eric /home/dani
on my machine gives me the files and directories that only exist in either directory and the ones they are in common:
Code:

<snip>
Only in eric: .lesshst
Only in eric: .linuxmint
Common subdirectories: dani/.local and eric/.local
Only in eric: .loki
</snip>

Kind regards,

Eric


All times are GMT -5. The time now is 06:46 PM.