[lfs-support] Using 'find' to Help Make Package Users Simpler
beesnees at grm.net
Wed Oct 16 17:20:58 PDT 2013
On 10/16/2013 03:59 PM, Dan McGhee wrote:
> On 10/16/2013 03:15 PM, Pierre Labastie wrote:
>> I've never tried two -exec directives in find, sorry. What I know is that xargs is more flexible,
>> and I recommand that you insist on having it work.
>> It could be something similar to:
>> find... -print| xargs -I xxx sh -c 'chmod xxx; chown xxx; echo xxx >> installdirs.lst'
>> more robust:
>> find... -print0 | xargs -0 -I xxx sh -c 'chmod xxx; chown xxx; echo xxx >> installdirs.lst'
>> Good luck
> My understanding of -I is that standard input would replace
> some string. Would you please tell me if my understanding of -I is
> right, and then indicate what I might put in place of "xxx".
I had it exactly backwards! -I replaces standard input with a specified
string. I used, simply, "file."
The command line with "print0" did exactly what I wanted. Maybe I should
now learn about aliases instead of writing a one line script. :)
Thanks again, Pierre. You really helped.
More information about the lfs-support