The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
comparing content of 2 variables in script sam4now Shell Programming and Scripting 5 04-24-2008 02:42 PM
Comparing directories via ftp tekster757 UNIX for Dummies Questions & Answers 1 03-21-2008 07:48 AM
searching content of files in the current and sub directories tiger99 Shell Programming and Scripting 4 01-23-2008 03:11 AM
moving directories to new directories on multiple servers mackdaddy07 Shell Programming and Scripting 0 04-06-2007 11:30 AM
comparing file content differences RianTan Shell Programming and Scripting 4 08-11-2005 02:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 04-29-2008
xyzt xyzt is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 21
comparing the content of two directories

Hello

I want to compare the content of two directories recursively to check if the two directories have the same files. How can I do that?
  #2 (permalink)  
Old 04-29-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,719
IF you mean just filenames, not file contents - one way:
Code:
ls dir1 > ./dir1.txt
ls dir2 > ./dir2.txt
diff dir1.txt dir2 txt
If you mean file contents:
Code:
diff dir1 dir2
[/code]
  #3 (permalink)  
Old 04-29-2008
cbkihong cbkihong is offline Forum Advisor  
Advisor
  
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,624
If you are not trying to put it into a program, and that using some sort of GUI is acceptable, I found diff frontends such as kdiff3, kompare and meld helpful because they will highlight what the differences are using a lot of visual aids such as colours to make diffs a lot more pleasurable to read.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0