{"slug": "xargs", "name": "xargs", "category": "terminal", "category_name": "Terminal and shell", "description": "", "recommenders": 4, "commenters": 8, "warners": 1, "score": 3.34, "rising": -1.31, "first": "2025-12-04", "latest": "2026-07-21", "why": "My go-to for fast and easy parallelization is xargs -P.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 2, "compare": 1, "warn": 1}, "spark": [0, 1, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "My go-to for fast and easy parallelization is xargs -P.", "kind": "", "icon": true, "domain": null, "github_repo": null, "official_url": "https://www.gnu.org/software/findutils/", "pricing": "", "aliases": ["xargs"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 783813905, "item_id": 48988369, "url": "https://news.ycombinator.com/item?id=48988369", "by": "dataflow", "date": "2026-07-20", "version": null, "stance": "recommend", "quote": "xargs Just Works without any of this nonsense", "excerpt": "> That's common on linux. Many tools read from stdin if a file path isn't given: cat, xargs, base64, cksum, etc. No. I did pipe to stdin. I'm not a noob. I use Linux all the time, very much including xargs and all. (What do you think I use instead of parallel?!) That's not what's going on here at all. Here's a command line I ran right now, and the output I see: $ echo \"http://www.example.com\" | parallel -k -j 8 curl ", "context": "Linux user", "use_case": "running commands from stdin", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 783782592, "item_id": 48986412, "url": "https://news.ycombinator.com/item?id=48986412", "by": "chasil", "date": "2026-07-20", "version": null, "stance": "recommend", "quote": "find . -name '*.log' -print0 | xargs -0 rm", "excerpt": "I use: find . -name '*.log' -print0 | xargs -0 rm For this simple example (derived from the article), find also has a delete operator. This null termination is now a POSIX standard.", "context": "", "use_case": "deleting files with null-terminated input", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 749742928, "item_id": 46858933, "url": "https://news.ycombinator.com/item?id=46858933", "by": "adolph", "date": "2026-02-02", "version": null, "stance": "recommend", "quote": "My go-to for fast and easy parallelization is xargs -P.", "excerpt": "My go-to for fast and easy parallelization is xargs -P. find a-bunch-of-files | xargs -P 10 do-something-with-a-file -P max-procs --max-procs=max-procs Run up to max-procs processes at a time; the default is 1. If max-procs is 0, xargs will run as many processes as possible at a time.", "context": "", "use_case": "Parallel command execution", "switched_from": "", "story": "4x faster network file sync with rclone (vs rsync) (2025)"}, {"id": 738438212, "item_id": 46152388, "url": "https://news.ycombinator.com/item?id=46152388", "by": "anthk", "date": "2025-12-04", "version": null, "stance": "recommend", "quote": "And xargs to paralelize stuff.", "excerpt": "I'm using 1GB with TWM, DIllo, TUI tools, XTerm, MuPDF and the like. As most tools are small from https://t3x.org, https://luxferre.top and https://howerj.github.io/subleq.htm with EForth, (and I try to use cparser instead of) clang, my requeriments are really tiny. You can achieve a lot by learning Klong and reading the intro on statistics. And xargs to paralelize stuff. Oh, and vidir to edit directories at crazy sp", "context": "", "use_case": "Parallelize shell commands", "switched_from": "", "story": "The RAM shortage comes for us all"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 783848064, "item_id": 48990504, "url": "https://news.ycombinator.com/item?id=48990504", "by": "tom_", "date": "2026-07-21", "version": null, "stance": "warn", "quote": "I never liked xargs either.", "excerpt": "I never liked xargs either. My replacement is kind of like \"xargs -n 1 -d '\\n' -J '{}'\", which experience has taught me is almost always what I want. It consumes all of its input before starting, so it knows how many files it has to process, and it can print progress to stderr and/or the terminal title as it goes. It can run each command via the shell if you want. It has --dry-run and --keep-going. It can read the fi", "context": "", "use_case": "running commands on file lists", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}]}], "who": [{"by": "dataflow", "context": "Linux user", "url": "https://news.ycombinator.com/item?id=48988369", "date": "2026-07-20"}], "tags": [], "use_cases": ["running commands on file lists", "running commands from stdin", "deleting files with null-terminated input", "running commands over piped input", "parallel command execution", "parallelize shell commands"], "compared": [{"slug": "gnu-parallel", "name": "GNU Parallel", "co": 2, "switched_from": 0, "switched_to": 1}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=48984270", "title": "I wrote an bash enumerator because I was sick of xargs", "mentions": 6}, {"url": "https://news.ycombinator.com/item?id=46820142", "title": "4x faster network file sync with rclone (vs rsync) (2025)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46151578", "title": "The RAM shortage comes for us all", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"recommend": 1}, "2026-01": {}, "2026-02": {"recommend": 1}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {}, "2026-07": {"neutral": 2, "recommend": 2, "warn": 1, "compare": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 783868385, "item_id": 48991774, "url": "https://news.ycombinator.com/item?id=48991774", "by": "westurner", "date": "2026-07-21", "version": null, "stance": "compare", "quote": "I might not have written `el` if I had been aware of `xargs -n/--max-args=1`", "excerpt": "But `ls -print0` is not an option; set -x mkdir test; cd \"$_\" touch \"test$'\\n'12.txt\" ls find find . -exec echo {} \\; find . -print0 find . -print0 | xargs -n 1 -0 echo # find . -print0 | el -0 -v -x echo \"{0} #\" Though, I just realized that this doesn't work yet: find . -print0 | el -0 -x -- sh -c 'set -x: echo \"{0} #\"' westurner/dotfiles/scripts/el: \"edit lines\" https://github.com/westurner/dotfiles/blob/master/scr", "context": "", "use_case": "", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 783848064, "item_id": 48990504, "url": "https://news.ycombinator.com/item?id=48990504", "by": "tom_", "date": "2026-07-21", "version": null, "stance": "warn", "quote": "I never liked xargs either.", "excerpt": "I never liked xargs either. My replacement is kind of like \"xargs -n 1 -d '\\n' -J '{}'\", which experience has taught me is almost always what I want. It consumes all of its input before starting, so it knows how many files it has to process, and it can print progress to stderr and/or the terminal title as it goes. It can run each command via the shell if you want. It has --dry-run and --keep-going. It can read the fi", "context": "", "use_case": "running commands on file lists", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 783813905, "item_id": 48988369, "url": "https://news.ycombinator.com/item?id=48988369", "by": "dataflow", "date": "2026-07-20", "version": null, "stance": "recommend", "quote": "xargs Just Works without any of this nonsense", "excerpt": "> That's common on linux. Many tools read from stdin if a file path isn't given: cat, xargs, base64, cksum, etc. No. I did pipe to stdin. I'm not a noob. I use Linux all the time, very much including xargs and all. (What do you think I use instead of parallel?!) That's not what's going on here at all. Here's a command line I ran right now, and the output I see: $ echo \"http://www.example.com\" | parallel -k -j 8 curl ", "context": "Linux user", "use_case": "running commands from stdin", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 783782592, "item_id": 48986412, "url": "https://news.ycombinator.com/item?id=48986412", "by": "chasil", "date": "2026-07-20", "version": null, "stance": "recommend", "quote": "find . -name '*.log' -print0 | xargs -0 rm", "excerpt": "I use: find . -name '*.log' -print0 | xargs -0 rm For this simple example (derived from the article), find also has a delete operator. This null termination is now a POSIX standard.", "context": "", "use_case": "deleting files with null-terminated input", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 783779888, "item_id": 48986243, "url": "https://news.ycombinator.com/item?id=48986243", "by": "ggm", "date": "2026-07-20", "version": null, "stance": "neutral", "quote": "98.89% of the time I type xargs -n 1 -0", "excerpt": "The prior has a point because 98.89% of the time I type xargs -n 1 -0 and we are deep in the useless pipe argument which Rob Pike amongst others has rehearsed well. I do it because I do it, just like why I use egrep and sed in pipes along with awk.", "context": "", "use_case": "running commands over piped input", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 783773680, "item_id": 48985855, "url": "https://news.ycombinator.com/item?id=48985855", "by": "somat", "date": "2026-07-20", "version": null, "stance": "neutral", "quote": "Xargs is fine, but openbsd has a -J option", "excerpt": "Xargs is fine, but openbsd has a -J option and every time I read the man page to figure out how to use it I read the -I and -J options and my brain glazes over. https://man.openbsd.org/xargs Other brain glazing obsd wierdness is it's two argument cd command, a cryptid I am unable to wrap my head around. https://man.openbsd.org/ksh#cd~2", "context": "", "use_case": "", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 749742928, "item_id": 46858933, "url": "https://news.ycombinator.com/item?id=46858933", "by": "adolph", "date": "2026-02-02", "version": null, "stance": "recommend", "quote": "My go-to for fast and easy parallelization is xargs -P.", "excerpt": "My go-to for fast and easy parallelization is xargs -P. find a-bunch-of-files | xargs -P 10 do-something-with-a-file -P max-procs --max-procs=max-procs Run up to max-procs processes at a time; the default is 1. If max-procs is 0, xargs will run as many processes as possible at a time.", "context": "", "use_case": "Parallel command execution", "switched_from": "", "story": "4x faster network file sync with rclone (vs rsync) (2025)"}, {"id": 738438212, "item_id": 46152388, "url": "https://news.ycombinator.com/item?id=46152388", "by": "anthk", "date": "2025-12-04", "version": null, "stance": "recommend", "quote": "And xargs to paralelize stuff.", "excerpt": "I'm using 1GB with TWM, DIllo, TUI tools, XTerm, MuPDF and the like. As most tools are small from https://t3x.org, https://luxferre.top and https://howerj.github.io/subleq.htm with EForth, (and I try to use cparser instead of) clang, my requeriments are really tiny. You can achieve a lot by learning Klong and reading the intro on statistics. And xargs to paralelize stuff. Oh, and vidir to edit directories at crazy sp", "context": "", "use_case": "Parallelize shell commands", "switched_from": "", "story": "The RAM shortage comes for us all"}]}