Date: Wed, 27 Jan 2010 14:17:37 -0500 From: Glen Barber <glen.j.barber@gmail.com> To: "Aryeh M. Friedman" <aryeh.friedman@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: OT: finding every file not in a list Message-ID: <20100127191737.GA70795@orion.hsd1.pa.comcast.net> In-Reply-To: <4B6090FC.4070002@gmail.com> References: <4B6090FC.4070002@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Aryeh M. Friedman wrote: > 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? Perhaps something like this will help: find /dir -type f | \ grep -v `cat excludelist` | \ xargs rm Regards, -- Glen Barber
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100127191737.GA70795>