View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


LinkBack Search this Thread
Old 03-06-2011, 05:53 AM   #1
Senior Member
Registered: Sep 2003
Distribution: Debian Squeeze / Wheezy
Posts: 1,606

Rep: Reputation: 45
compare contents of 2 directories


Howto compare contents of 2 directories under squeeze?
Old 03-06-2011, 06:05 AM   #2
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290

You can use the diff command for that.
man diff
For example:
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:
Only in eric: .lesshst
Only in eric: .linuxmint
Common subdirectories: dani/.local and eric/.local
Only in eric: .loki
Kind regards,

1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
compare the contents of two DVDs cccc Debian 11 05-02-2010 11:45 AM
Inquiry:How to compare the contents of two folders? hadimotamedi Linux - Newbie 7 12-02-2009 05:26 AM
compare folder contents babysnake Linux - Newbie 4 02-09-2007 07:04 AM
How to compare two folders contents? rvoigt Linux - Newbie 6 01-07-2005 12:35 AM
to compare the contents of 2 files MaleWithBrains Linux - Newbie 3 01-27-2004 06:39 PM

All times are GMT -5. The time now is 01:25 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration