From owner-freebsd-questions@FreeBSD.ORG Wed Jan 27 20:40:00 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31C1A1065679 for ; Wed, 27 Jan 2010 20:40:00 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.9]) by mx1.freebsd.org (Postfix) with ESMTP id 0C18B8FC17 for ; Wed, 27 Jan 2010 20:39:59 +0000 (UTC) Received: (qmail 10823 invoked from network); 27 Jan 2010 20:39:59 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 27 Jan 2010 20:39:59 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 74C645082E; Wed, 27 Jan 2010 15:39:58 -0500 (EST) From: Lowell Gilbert To: "Aryeh M. Friedman" References: <4B6090FC.4070002@gmail.com> <443a1rl59p.fsf@be-well.ilk.org> <4B60946D.3070708@gmail.com> Date: Wed, 27 Jan 2010 15:39:58 -0500 In-Reply-To: <4B60946D.3070708@gmail.com> (Aryeh M. Friedman's message of "Wed, 27 Jan 2010 14:30:53 -0500") Message-ID: <44wrz3jn8h.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: finding every file not in a list 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: Wed, 27 Jan 2010 20:40:00 -0000 "Aryeh M. Friedman" writes: > Lowell Gilbert wrote: >> *not* OT, I would say... >> >> "Aryeh M. Friedman" writes: >> >> >>> I have a list of files that should be in a dir tree and want to remove >>> any files from the tree not in list (i.e. if it is on the list keep it >>> else rm it)... any quick way to do this? >>> >> >> mtree(8) >> >> > Tried aelpf -p master | mtree -p ~aegis/master/baseline/" (ignore the > aelpf it is a command unique to devel/aegis) but got the following: > > mtree: line 1: slash character in file name You'll need to turn the file list into an mtree specification before you can use it to do this. Why don't you try one of the other suggestions (which may be usable as-is)? -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/