On 8/17/07, Thomas Smith <[EMAIL PROTECTED]> wrote:
> I took umbrage to the use of the find -exec primary in
The problem with find | xargs is that it doesn't handle quotes in file
system names:
[EMAIL PROTECTED]:~/tmp$ touch 'fo"oo'
[EMAIL PROTECTED]:~/tmp$ ll
total 8
drwxr-xr-x 2 alexeyv alexeyv 4096 2007-08-17 23:43 .
drwxr-xr-x 62 alexeyv alexeyv 4096 2007-08-17 23:29 ..
-rw-r--r-- 1 alexeyv alexeyv 0 2007-08-17 23:43 fo"oo
[EMAIL PROTECTED]:~/tmp$ find . | xargs echo
xargs: unmatched double quote; by default quotes are special to xargs
unless you use the -0 option
.
while find -exec works fine and dandy:
[EMAIL PROTECTED]:~/tmp$ find . -exec echo {} \;
.
./fo"oo
Also, I'm not sure, but I vaguely remember seeings xargs rejecting
overly long argument lists on some Unixes (not on Linux though).
--
Alexey Verkhovsky
CruiseControl.rb [http://cruisecontrolrb.thoughtworks.com]
RubyWorks [http://rubyworks.thoughtworks.com]
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---