Discussion:
utility to compare 2 dir trees
Fbsd8
2013-01-01 01:23:33 UTC
Permalink
I want to compare 2 different directory trees to each other to locate
any differences in directories and files contained there in.

Any suggestions?
Adam Vande More
2013-01-01 01:31:46 UTC
Permalink
I want to compare 2 different directory trees to each other to locate any
differences in directories and files contained there in.
Any suggestions?
mtree(8)
--
Adam Vande More
Fbsd8
2013-01-01 01:45:39 UTC
Permalink
Post by Adam Vande More
I want to compare 2 different directory trees to each other to locate any
differences in directories and files contained there in.
Any suggestions?
mtree(8)
From the man page I don't see how to code mtree to compare 2 different
directory trees against each other.
Erich Dollansky
2013-01-01 01:53:55 UTC
Permalink
Hi,

On Mon, 31 Dec 2012 20:45:39 -0500
Post by Fbsd8
Post by Adam Vande More
Post by Fbsd8
I want to compare 2 different directory trees to each other to
locate any differences in directories and files contained there in.
Any suggestions?
mtree(8)
From the man page I don't see how to code mtree to compare 2
different directory trees against each other.
you can compare a directory tree which is rooted in your current
directory and a specified one.
The mtree utility compares the file hierarchy rooted in the current
directory against a specification read from the standard input.
Messages are written to the standard output for any files whose
characteristics do not match the specifications, or which are missing
from either the file hierarchy or the specification.

Erich
Post by Fbsd8
_______________________________________________
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to
Fbsd8
2013-01-01 02:09:28 UTC
Permalink
Post by Erich Dollansky
Hi,
On Mon, 31 Dec 2012 20:45:39 -0500
Post by Fbsd8
Post by Adam Vande More
Post by Fbsd8
I want to compare 2 different directory trees to each other to
locate any differences in directories and files contained there in.
Any suggestions?
mtree(8)
From the man page I don't see how to code mtree to compare 2
different directory trees against each other.
you can compare a directory tree which is rooted in your current
directory and a specified one.
The mtree utility compares the file hierarchy rooted in the current
directory against a specification read from the standard input.
Messages are written to the standard output for any files whose
characteristics do not match the specifications, or which are missing
from either the file hierarchy or the specification.
Erich
So
cd dir-tree1
mtree -p dir-tree2

Do I understand you correctly?
Fbsd8
2013-01-01 02:39:45 UTC
Permalink
Post by Fbsd8
Post by Erich Dollansky
Hi,
On Mon, 31 Dec 2012 20:45:39 -0500
Post by Fbsd8
Post by Adam Vande More
Post by Fbsd8
I want to compare 2 different directory trees to each other to
locate any differences in directories and files contained there in.
Any suggestions?
mtree(8)
From the man page I don't see how to code mtree to compare 2
different directory trees against each other.
you can compare a directory tree which is rooted in your current
directory and a specified one.
The mtree utility compares the file hierarchy rooted in the current
directory against a specification read from the standard input.
Messages are written to the standard output for any files whose
characteristics do not match the specifications, or which are missing
from either the file hierarchy or the specification.
Erich
So
cd dir-tree1
mtree -p dir-tree2
Do I understand you correctly?
ended up trying
cd dir-tree1
mtree -c | mtree -p dir-tree2

Now this seems like it worked, except every thing was flagged for
non-matching modification time. How do I tell it to not check
modification time?
Adam Vande More
2013-01-01 19:16:41 UTC
Permalink
Post by Fbsd8
ended up trying
cd dir-tree1
mtree -c | mtree -p dir-tree2
Now this seems like it worked, except every thing was flagged for
non-matching modification time. How do I tell it to not check modification
time?
mtree -c -k sha256digest,uname,gname | mtree -p dir-tree2
--
Adam Vande More
Fbsd8
2013-01-03 16:38:09 UTC
Permalink
Post by Adam Vande More
Post by Fbsd8
ended up trying
cd dir-tree1
mtree -c | mtree -p dir-tree2
Now this seems like it worked, except every thing was flagged for
non-matching modification time. How do I tell it to not check modification
time?
mtree -c -k sha256digest,uname,gname | mtree -p dir-tree2
Thank you that worked.

Robert Bonomi
2013-01-01 05:14:56 UTC
Permalink
Date: Mon, 31 Dec 2012 20:23:33 -0500
Subject: utility to compare 2 dir trees
I want to compare 2 different directory trees to each other to locate
any differences in directories and files contained there in.
Any suggestions?
'man diff'
Matthew Seaman
2013-01-01 06:23:31 UTC
Permalink
Post by Fbsd8
I want to compare 2 different directory trees to each other to locate
any differences in directories and files contained there in.
Any suggestions?
diff -ru directory1 directory2

Cheers,

Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
Loading...