how to compare permissions between two dirs

Greg Larkin glarkin at FreeBSD.org
Mon Mar 22 14:30:09 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Aryeh M. Friedman wrote:
> In switching to a new make file for a personal project I have run into
> the problem of under the old makefile everything works (web site) and
> under the new one it does not... when manually looking at the two dirs
> they appear identical in layout, sizes and perms (dir and file level)
> but I want to make sure... is there any way to compare two diff dirs and
> see if they only differ in date stamps? (note since there are several
> developers working on this project I need to compare even if the owners
> are diff)

Hi Aryeh,

I haven't tested this extensively, but it looks promising:

mtree -c -n -i -p /path/to/directory/one > /tmp/dirlist1.txt
mtree -c -n -i -p /path/to/directory/two > /tmp/dirlist2.txt
diff /tmp/dirlist[12].txt

Hope that helps,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/           - The Power To Serve
http://www.sourcehosting.net/     - Ready. Set. Code.
http://twitter.com/sourcehosting/ - Follow me, follow you
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFLp37v0sRouByUApARAm6sAJ9OIXbr7uSJ9PeH4RPf3EwxPmJPiwCcC8Sb
TzWV52qn1cx00sypkngObXs=
=r1W2
-----END PGP SIGNATURE-----



More information about the freebsd-questions mailing list