> On Sat, 21 Apr 2001 14:06:04 +0100, Brian Somers wrote: > > > How do you do this in a script: > > > > cd /topdir; find . -type f | xargs -i {} cp {} /otherdir/. > > for i in `find /path/to/source -type f`; do > cp $i /path/to/dest/ > done > > What's all the fuss about? Have you tried that for values of /path/to/source with lots of files ? Something like find blah | while read i; do cp $i /dest/.; done is better, but it runs cp too many times. > Ciao, > Sheldon. -- Brian <[EMAIL PROTECTED]> <brian@[uk.]FreeBSD.org> <http://www.Awfulhak.org> <brian@[uk.]OpenBSD.org> Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
- Re: cp -d dir patch for review... Garance A Drosihn
- Re: cp -d dir patch for review... Dima Dorfman
- Re: cp -d dir patch for review (or... Alexander Kabaev
- Re: cp -d dir patch for review... Sheldon Hearn
- Re: cp -d dir patch for review... Alexander Kabaev
- Re: cp -d dir patch for review... Brian Somers
- Re: cp -d dir patch for review... Maxim Sobolev
- Re: Re: cp -d dir patch for re... Brian Somers
- Re: cp -d dir patch for review... Maxim Sobolev
- Re: Re: cp -d dir patch for re... Brian Somers
- Re: cp -d dir patch for review (or... Brian Somers
- Re: cp -d dir patch for review... Bruce Evans
- Re: cp -d dir patch for review (or 'xar... Rodney W. Grimes
- Re: cp -d dir patch for review (or... Brian Somers
- Re: cp -d dir patch for review (or... Oliver Fromme
- Re: cp -d dir patch for review... Brian Somers
- Re: cp -d dir patch for review... Oliver Fromme
- Re: cp -d dir patch for review (or 'xargs'?) Dima Dorfman