BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] xargs guide
- Subject: [Discuss] xargs guide
- From: abreauj at gmail.com (John Abreau)
- Date: Wed, 29 Jul 2015 22:59:08 -0400
- In-reply-to: <20150729213913.61e4ac27@mydesq2.domain.cxm>
- References: <20150729213913.61e4ac27@mydesq2.domain.cxm>
Looks useful. I notice a complete absence of the single most important option, though: -0. When I use find(1) and xargs(1), by default I always use something like find . -xdev ...... -print0 | xargs -0 .... The -xdev protects against find(1) straying off the current filesystem if it trips over an unexpected symlink, and the -print0 / -0 disables a lot of other potential failure modes. On Wed, Jul 29, 2015 at 9:39 PM, Steve Litt <slitt at troubleshooters.com> wrote: > Hi all, > > xargs is a gender-changer type program that adapts one program's stdout > to the next program's command line arguments. It's extremely handy for > shell scripting, but it can be tricky. I've written a short guide for > xargs that shows how to get around the usual xargs landmines: > > http://www.troubleshooters.com/linux/xargs.htm > > Hope you like it. > > SteveT > > Steve Litt > July 2015 featured book: Rapid Learning for the 21st Century > http://www.troubleshooters.com/rl21 > _______________________________________________ > Discuss mailing list > Discuss at blu.org > http://lists.blu.org/mailman/listinfo/discuss > -- John Abreau / Executive Director, Boston Linux & Unix Email: abreauj at gmail.com / WWW http://www.abreau.net / PGP-Key-ID 0x920063C6 PGP-Key-Fingerprint A5AD 6BE1 FEFE 8E4F 5C23 C2D0 E885 E17C 9200 63C6
- Follow-Ups:
- [Discuss] xargs guide
- From: hag at linnaean.org (Daniel Hagerty)
- [Discuss] xargs guide
- References:
- [Discuss] xargs guide
- From: slitt at troubleshooters.com (Steve Litt)
- [Discuss] xargs guide
- Prev by Date: [Discuss] xargs guide
- Next by Date: [Discuss] Remember the Samsung TRIM data corruption bug?
- Previous by thread: [Discuss] xargs guide
- Next by thread: [Discuss] xargs guide
- Index(es):