Date: Thu, 13 Sep 2012 10:23:47 +0200 From: Jonathan McKeown <j.mckeown@ru.ac.za> To: freebsd-questions@freebsd.org Subject: Re: cksum entire dir?? Message-ID: <201209131023.47782.j.mckeown@ru.ac.za> In-Reply-To: <20120912202945.GC17551@ethic.thought.org> References: <20120911213804.GA9817@ethic.thought.org> <201209120912.58165.j.mckeown@ru.ac.za> <20120912202945.GC17551@ethic.thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 12 September 2012 22:29:45 Gary Kline wrote: > how, with mtree, could I tell whether dir1 =3D=3D dir2 or not? =46rom the manpage: ``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.'' So you run mtree twice, once against dir1 with the -c option to output the= =20 specification for the directory tree to stdout (which you can capture to a= =20 file, or pipe straight into the second invocation) and once against dir2 wi= th=20 the output of the first one as input (either in a pipeline, or by using -f= =20 with the filename of the captured output). Jonathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209131023.47782.j.mckeown>