BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] xargs guide
- Subject: [Discuss] xargs guide
- From: hag at linnaean.org (Daniel Hagerty)
- Date: Sat, 01 Aug 2015 12:36:26 -0400
- In-reply-to: <CAAbKA3UTg_hX4dNqJ4ysMYUSQyaknXaDCXZDVt2qw7gOCZZOVw@mail.gmail.com> (Bill Ricker's message of "Fri, 31 Jul 2015 23:04:31 -0400")
- References: <20150729213913.61e4ac27@mydesq2.domain.cxm> <CAFv2jcaDqDsObQACkWeD-XDuOiGxUgkCiHQ5X5JRK_F82yfTgA@mail.gmail.com> <c2ibnerpvwx.fsf@perdition.linnaean.org> <CAAbKA3UTg_hX4dNqJ4ysMYUSQyaknXaDCXZDVt2qw7gOCZZOVw@mail.gmail.com>
Bill Ricker <bill.n1vux at gmail.com> writes: > | xargs has advantages over -exec. > + Can take multiple files per exec if supported, e.g. 'rm', massively > reducing the exec() overhead. > + can work with sources of filenames other than find You misunderstand. You are thinking of "find -exec {} ;" which is an exec per found object. find $find_args -print0 | xargs -0 $command is approximately find $find_args -exec $command {} + with some other small optimizations you can get by having this canonical idiom open coded into find. It saves brain cells, it doesn't obsolete xargs.
- Follow-Ups:
- [Discuss] xargs guide
- From: richard.pieri at gmail.com (Rich Pieri)
- [Discuss] xargs guide
- Next by Date: [Discuss] Boston Linux and Unix Annual Summer BBQ XXI reminder Saturday, August 1, 2015 3:00 PM
- Next by thread: [Discuss] xargs guide
- Index(es):