On Thu, 12 Apr 2001 at 10:49am (+1000), Dan Horth wrote:

> Hi - I was wondering if there was a tool similar to diff that would
> allow me to compare two file systems and check that they are
> identical - as in same files, same permissions, same file sizes, etc.
>

Possibly you could do something like...

(cd /fs1 && find . -mount -printf '%m %n %u %g %s %Cs %p\n') | sort > fs1.out
(cd /fs2 && find . -mount -printf '%m %n %u %g %s %Cs %p\n') | sort > fs2.out
diff fs1.out fs2.out

... this should show difference in filesystem structure (presence or absence
of files/dirs), modes, link counts, users, groups, size, and ctime.  The cd
at the beginning to make so we only compare relative path names.  See the
find(1L) man page for the details of -printf if you want to compare more or
less stuff - you might not care about links counts of modification times for
instance.

M.

-- 
WebCentral Pty Ltd           Australia's #1 Internet Web Hosting Company
Level 1, 96 Lytton Road.           Network Operations - Systems Engineer
PO Box 4169, East Brisbane.                       phone: +61 7 3249 2557
Queensland, Australia.                            pgp key id: 0x900E515F





_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to