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 > Pierre Thank you, Pierre! I now know why I was not successful with xargs. I didn't know about "sh -c". I never really jumped into the examples at the end of the man page. And know I need to really get a firm handle on all the options for xargs so I can use it.
I don't understand, though, "-I xxx". First, I don't know what the xxx would mean, and secondly, the way I see it in my limited knowlege, the file name would be the standard input, but what "string" would it be replacing. 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". Thanks, Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page