The UNIX and Linux Forums  

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
finding difference between 2 directory recursively yayati Shell Programming and Scripting 2 04-09-2008 07:37 AM
Finding the time difference padma.raajesh Shell Programming and Scripting 0 02-27-2008 08:12 PM
compare 2 file and print difference in the third file URG PLS evvander Shell Programming and Scripting 3 09-24-2007 03:52 AM
Strange difference in file size when copying LARGE file.. 0ktalmagik Filesystems, Disks and Memory 1 06-03-2006 04:34 PM
Newbie question about difference between executable file and ordinary file Balaji UNIX for Dummies Questions & Answers 1 11-29-2000 02:49 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2007
Registered User
 

Join Date: Jul 2006
Posts: 14
finding difference file to file

Hi,

I have some 10 files in one directory and 10 files in another diretory

/t1/t2/file1.txt
/t1/t2/file2.txt
/t1/t2/file3.txt
/t1/t2/file4.txt
.
.
.
.
etc

similarly

/t1/t3/file1.txt
/t1/t3/file2.txt
/t1/t3/file3.txt
/t1/t3/file4.txt
.
.
.
etc

file1,file2,file3 are the files which contains some data..

/t1/t2/file1.txt --- contains original data
/t1/t3/file1.txt ---- contains same data as above but with small changes

I can use diff command to find the difference between these two files, but i want to find it for all the files.. which will be the best solution..

file to file difference ( say both the directories have 100 files like that with similar file name)

It would be of great help...


Thanks in advance..
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 09-03-2007
Moderator
 

Join Date: Dec 2003
Location: /dev/florida
Posts: 955
Have a look at the dirdiff utility if it is available on your platform. Otherwise just write a small shell script to loop through each filename in the first directory use the diff utility to compare it to the same file in the second directory.
Reply With Quote
  #3 (permalink)  
Old 09-03-2007
Registered User
 

Join Date: Jul 2006
Posts: 14
thanks

DIRDIFF, i am not finding it, but i saw another command dircmp, and this works..

is there any other solution possible..
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0