Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!bacchus!mwm From: mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.sys.amiga.introduction Subject: Re: Wildcards in the CLI Message-ID: Date: 8 May 91 21:29:05 GMT References: <12024@mentor.cc.purdue.edu> Sender: news@pa.dec.com (News) Organization: Missionaria Phonibalonica Lines: 38 In-Reply-To: asg@sage.cc.purdue.edu's message of 7 May 91 21:45:13 GMT In article <12024@mentor.cc.purdue.edu> asg@sage.cc.purdue.edu (The Grand Master) writes: }For instance, on unix, to move all the .c files out of a directory }requires exec'ing one cp per file, even though cp takes multiple }arguments. You do: } } find . -name '*.c' -exec cp '{}' dest \; } Someone has missinformed you about this: My man page says: Usage: cp [-ip] f1 f2; or: cp [-irp] f1 ... fn d2 which means you can do cp ` find . -name '*.c' -print` dest Sorry, your version breaks if you generate to long a command line (before running out of memory, that is). While that number has gone up with more recent versions of unix, Plan 9 (which may or may not be considered a "version of Unix") is the only one I know of that avoids it completely. Note that "long lines" is typically 5K or more; it's 20K on the box I'm using now. Both treewalk and xargs avoid this problem. }That time we slept together Mike Meyer }That's as far as it went mwm@pa.dec.com }Yet though we're not quite lovers decwrl!mwm }You're more than a friend ^^^^^^^^^^^^^^^^^^^^^^^^^ (that is underlineing the whole passage, not just the last line) You obviously do not understand what sex is all about Wrong forum, but I expect your understanding of sex is even worse than your understanding of Unix.