Topic: xargs
-
find and xargs exit codes: find's coarse 0/>0 versus xargs's 123-127 ladder
find only promises 0 for full success and any value above 0 for an error, deliberately without finer detail, while xargs defines a specific ladder for how the invoked command failed: 123 for an ordinary non-zero exit, 124 for exit 255, 125 for killed-by-signal, 126 for not-invocable, and 127 for not-found. Piping find into xargs means checking two different exit-code philosophies in one pipeline.
-
"Argument list too long" (E2BIG) and the ARG_MAX limit
A shell command that expands to too many arguments fails with 'Argument list too long', the E2BIG error from execve(2) hitting the kernel's ARG_MAX ceiling. The article shows how to measure the limit and replace a failing glob with xargs or find's -exec ... + batching instead of trying to quote around it.
Machine-readable: JSON