On 21-Apr-2001 Sheldon Hearn wrote:
>
>
> 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?
>
It looks like above construct will fail horribly if any of the files in /topdir
have names with spaces in them. Think MP3 collections :)
> Ciao,
> Sheldon.
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-current" in the body of the message
----------------------------------
E-Mail: Alexander Kabaev <[EMAIL PROTECTED]>
Date: 21-Apr-2001
Time: 10:49:59
----------------------------------
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message
- Re: cp -d dir patch for review (or 'xargs'?) Oliver Fromme
- Re: cp -d dir patch for review (or 'xargs'?) Jordan Hubbard
- Re: cp -d dir patch for review (or 'xargs'?) Dima Dorfman
- Re: cp -d dir patch for review (or 'xargs'?) Oliver Fromme
- Re: cp -d dir patch for review (or 'xargs'?) Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Dima Dorfman
- Re: cp -d dir patch for review (or 'xargs'?) Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Garance A Drosihn
- Re: cp -d dir patch for review (or 'xargs'?) Dima Dorfman
- Re: cp -d dir patch for review (or 'xargs'?) Alexander Kabaev
- Re: cp -d dir patch for review (or 'xargs'?) Sheldon Hearn
- Re: cp -d dir patch for review (or 'xargs'?) Alexander Kabaev
- Re: cp -d dir patch for review (or 'xargs'?) Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Maxim Sobolev
- Re: Re: cp -d dir patch for review (or 'xargs'?... Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Maxim Sobolev
- Re: Re: cp -d dir patch for review (or 'xargs'?... Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Brian Somers
- Re: cp -d dir patch for review (or 'xargs'?) Bruce Evans
- Re: cp -d dir patch for review (or 'xargs'?) Rodney W. Grimes
