Date: Sat, 22 Nov 2003 13:31:39 +0000 From: Jez Hancock <jez.hancock@munk.nu> To: freebsd-questions@freebsd.org Subject: Re: newbie: to pipe the result of a program as commandline parameter for another. Message-ID: <20031122133139.GB43100@users.munk.nu> In-Reply-To: <3FBF5E71.8050809@hotmail.com> References: <3FBF5E71.8050809@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 22, 2003 at 09:02:41PM +0800, Zhang Weiwu wrote: > Hello. I just checkouted a big program. What I want to do is to remove > all CVS/ folders from the hierarchy. > > There might be other ways to do so (give me a hint?). What I can think > of is to run find(1) to find out all CVS folders, and pass them as > parameters of rm(1), but I don't know how to do so. find . -name "CVS" -type d would find all directories named CVS under the current dir. Once you're happy with the directories it finds you could pipe the results to xargs: find . -name "CVS" -type d | xargs rm -rf -- Jez Hancock - System Administrator / PHP Developer http://munk.nu/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031122133139.GB43100>