parallel

Execute jobs in parallel from command line or files.

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

GNU parallel runs jobs concurrently across CPU cores or remote hosts, replacing xargs -P with a more powerful and flexible interface. Supports progress bars, retry logic, input from files, and running across SSH hosts. Essential for bulk operations.

Common flags
FlagMeaning
-j --jobsNumber of parallel jobs (default: CPU count)
--delayDelay between job starts
--retriesRetry failed jobs N times
--progressShow progress bar
-S --sshRun jobs on remote hosts via SSH
Examples
parallel -j 8 gzip ::: *.logCompress log files 8 at a time · explain & risk-check →
cat urls.txt | parallel -j 10 curl -ODownload 10 URLs simultaneously · explain & risk-check →
parallel -j 4 --progress kubectl delete pod ::: $(kubectl get pods -o name)Delete pods 4 at a time with progress · explain & risk-check →
parallel --retries 3 'curl -f {}' ::: $(cat endpoints.txt)Test endpoints with retry on failure · explain & risk-check →
Pro tip

Use `parallel --delay 0.1` when hitting APIs to avoid rate limiting — adds 100ms between job starts while still running many jobs concurrently.

Related
xargs jobs nproc
Open the full explainer →More in Shell & Scripting

Reference text is hand-written and may be incomplete — check man parallel for your version. Test destructive commands on a non-production system first.