[Tutor] fast recursive directory compares

Rick Pasotto rickp@telocity.com
Tue Dec 31 16:33:10 2002


On Tue, Dec 31, 2002 at 02:33:36PM -0500, Terence Lo wrote:
> Ok, suppose that i have directories Dir1 and Dir2 which each contain
> multiple nested subdirectories. i'm trying to generate a listing of
> files that are
> 
> 1) present in dir1 but not present in dir2 *and*
> 2) present in dir2 but not present in dir1.
> 
> what i'd like to do is something similar to what xdiff does when
> comparing two files.

Just to clarify, are two files the same if:

1) their names are the same (regardless of contents)? or
2) their contents are the same (regardless of name)? or
3) both their names and contents are the same? or
4) they *are* the same (ie, under unix their inodes are the same)?

-- 
"All men recognize the right of revolution; that is, the right to
refuse allegiance to and to resist, the government, when its tyranny
or its inefficiency are great and unendurable." -- Henry David Thoreau
    Rick Pasotto    rick@niof.net    http://www.niof.net