PARALLEL(1)
πΈ NAME πΈ
okay bestie, welcome to parallel(1) from moreutils β it's the manual page for a tool that runs programs in parallel. iconic π
β¨ SYNOPSIS β¨
parallel [options] [command]-- [argument ...]
parallel [options]-- [command ...]
π¦ DESCRIPTION π¦
parallel runs the command you specify and passes it a single one of the arguments you specify. Then it does that again for each argument. Jobs may be run in parallel, and the default is to run one job per CPU. slay β¨
If no command is specified before the --, then the commands after it are instead run in parallel. periodt π
π OPTIONS π
-jmaxjobs β use this to limit the number of jobs that are run at the same time. π«Ά-lmaxload β wait as needed to avoid starting new jobs when the system's load average is not below the specified limit. lowkey a vibe check for your CPU π-iβ normally the command is passed the argument at the end of its command line. With this option, any instances of"{}"in the command are replaced with the argument. π―-nβ number of arguments to pass to a command at a time. Default is1. Incompatible with-i. not them being incompatible bestie π
π₯ EXAMPLE π₯
parallel sh -c "echo hi; sleep 2; echo bye" -- 1 2 3
This runs three subshells that each print a message, delay, and print another message. If your system has multiple CPUs, parallel will run some of the jobs in parallel, which should be clear from the order the messages are output. the way that works is so satisfying π
parallel -j 3 ufraw -o processed -- *.NEF
This runs three ufraw processes at the same time until all of the NEF files have been processed. π¦
parallel -j 3 -- ls df "echo hi"
This runs three independent commands in parallel. main character energy fr fr π
β EXIT STATUS β
Its exit status is the combination of the exit statuses of each command ran, ORed together. (Thus, if any one command exits nonzero, parallel as a whole will exit nonzero.) no cap, one bad command can make the whole thing exit nonzero π
πΈ NOTES πΈ
All output to stdout and stderr is serialised through a corresponding internal pipe, in order to prevent annoying concurrent output behaviour. π«Ά
Note that serialisation is not done on any other file descriptors, and file position based access to a nonstandard file descriptor might have unexpected results. bestie please be careful with that one π
π AUTHOR π
Tollef Fog Heen
okay bestie, that's the whole page β brought to you by moreutils, dated 2009-07-02. mwah πβ¨
π¦ where this page comes from
- alpine 3.24: moreutils-doc 0.70-r1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms