newbie: to pipe the result of a program as commandline
parameter for another.
Jez Hancock
jez.hancock at munk.nu
Sat Nov 22 05:31:43 PST 2003
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/
More information about the freebsd-questions
mailing list