Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] xargs guide

Looks useful.

I notice a complete absence of the single most important option, though:

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>

> 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:
> Hope you like it.
> SteveT
> Steve Litt
> July 2015 featured book: Rapid Learning for the 21st Century
> _______________________________________________
> Discuss mailing list
> Discuss at

John Abreau / Executive Director, Boston Linux & Unix
Email: abreauj at / WWW / PGP-Key-ID 0x920063C6
PGP-Key-Fingerprint A5AD 6BE1 FEFE 8E4F 5C23  C2D0 E885 E17C 9200 63C6

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /