[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Taking diff of two directories recursively?



> 
> On Tue, 4 Nov 1997, Sam Ockman wrote:
> 
> > I need to take the diff of two directories recursively, but am not just
> > interested in what files are different...I'm also interested in if the dates
> > of the files are different, the uids, the gids, and the permissions.  Anyone
> > know of a program to tell me all of this?
> 
> One solution that crossed my mind:
> 
> You could tar one of the dirs and let tar compare the contents of the .tar
> file with the other dir.
> 
> I know this is not a very good solution, but I couldn't think of a better
> one.
> 

What about

> cd dir1
> ls -lR > ~/dir1.lst
> cd dir2
> ls -lR > ~/dir2.lst
> cd
> diff dir1.lst dir2.lst

I'll leave it as an exercise to the reader to make a nice bash script
out of this idea, which I hereby donate to the free software community
:).

Eric

-- 
 E.L. Meijer (tgakem@chem.tue.nl)          | tel. office +31 40 2472189
 Eindhoven Univ. of Technology             | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax    +31 40 2455054


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: