From owner-freebsd-questions@FreeBSD.ORG Thu Sep 13 08:23:51 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B04EA1065672 for ; Thu, 13 Sep 2012 08:23:51 +0000 (UTC) (envelope-from j.mckeown@ru.ac.za) Received: from mail.ru.ac.za (mail.ru.ac.za [IPv6:2001:4200:1010:0:250:56ff:fe8d:5]) by mx1.freebsd.org (Postfix) with ESMTP id CDE388FC08 for ; Thu, 13 Sep 2012 08:23:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ru.ac.za; s=ru-msa; h=X-Authenticated-User:Message-Id:Content-Type:MIME-Version:Date:Subject:To:From; bh=gkEzI639zox6QezHCHJI1pVONkZsnh4Nu6SqKaHKxjc=; b=WjWsbIMKGfUei2ULhlJ+yJndZGyRflW1Qedtn4SxFCOPHyW0zB3CkDzZjDuZzBZsPttxX9mSqwkf7J9lkzNGAlC2mbu8OVSg/xWblwFIM4iaxgwTqOWy9iVkMVVuBeCv; Received: from vorkosigan.ru.ac.za ([2001:4200:1010:1058:219:d1ff:fe9f:a932]:55352) by mail.ru.ac.za with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1TC4iC-000Eoc-2C for freebsd-questions@freebsd.org; Thu, 13 Sep 2012 10:23:48 +0200 From: Jonathan McKeown Organization: Rhodes University To: freebsd-questions@freebsd.org Date: Thu, 13 Sep 2012 10:23:47 +0200 User-Agent: KMail/1.9.10 References: <20120911213804.GA9817@ethic.thought.org> <201209120912.58165.j.mckeown@ru.ac.za> <20120912202945.GC17551@ethic.thought.org> In-Reply-To: <20120912202945.GC17551@ethic.thought.org> X-Face: $@VrUx^RHy/}yu]jKf/<4T%/d|F+$j-Ol2"2J$q+%OK1]&/G_S9(=?utf-8?q?HkaQ*=60!=3FYOK=3FY!=27M=60C=0A=09aP=5C9nVPF8Q=7DCilHH8l=3B=7E!4?= =?utf-8?q?2HK6=273lg4J=7Daz?=@1Dqqh:J]M^"YPn*2IWrZON$1+G?oX3@ =?utf-8?q?k=230=0A=0954XDRg=3DYn=5FF-etwot4U=24b?=dTS{i X-Virus-Scanned: mail.ru.ac.za (2001:4200:1010:0:250:56ff:fe8d:5) X-Authenticated-User: s0900137 from vorkosigan.ru.ac.za (2001:4200:1010:1058:219:d1ff:fe9f:a932) using auth_plaintext Subject: Re: cksum entire dir?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 08:23:51 -0000 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