xargs Builder
Build and explain an xargs command — null input, batch size, parallelism and a replace string, with a note on each flag.
xargs Builder
Command
History for this tool
The most recent data you entered in this tool, stored only in this browser.
Save what you type here, in this browser? Your work would go into this browser's local storage, so a refresh or a trip to another tool does not wipe it. You also get a short list of previous entries under the form, each one restorable with a click. Nothing is ever uploaded, and there is no account.
Being straight about the trade-off: anything kept there can be read by anyone who can use this browser profile, and by any script that later runs on this site. A tool page can hold a private key, a password or a signed token. Saving is convenient; it is not private.
About this tool
Build an xargs command and see what each flag means. Choose how the input is split, how many items go to each command, how many commands run at once, and whether a replace string is used. The page writes the command and lists a plain-language note for every flag it added.
Questions
- Why pair -0 with find -print0?
- The null byte is the only character that cannot appear in a file name, so find -print0 and xargs -0 pass paths with spaces or newlines through without splitting them into extra arguments.
- What does -I do to -n?
- -I implies one item per command, so -n has no effect once -I is set. The builder drops -n when you turn on the replace string.
- Is it safe to run commands in parallel?
- Only if the command does not depend on order and does not write to the same output. -P speeds things up, but two jobs writing the same file will race.