par(1)
๐ par โ bestie's guide to parallel command processing ๐
okay so you found par(1) in the General Commands Manual section and you're like "what even is this" โ bestie, it's giving parallel command processing, and honestly? iconic. let's go. โจ
๐ธ SYNOPSIS ๐ธ
par [-FHdefiqx] [-c command] [-l logfile] [-n #] [-p #] [file
[file...]]
๐ฆ DESCRIPTION ๐ฆ
so par takes a list of files and runs a command on them. main character energy fr fr.
The first line of each file begins with a colon (:) or a pound-sign (#). Here's the vibe check:
- If it's a colon, the remainder of that line is a command to run for each of the subsequent lines. ๐
- If it's a pound-sign, then each subsequent line is a (self-contained) command โ unless the
-coption was specified, in which case the lines become the arguments replacing the braces ({}s) in the-cargument.
The input file may also be specified on stdin, in the format as previously described. no cap. ๐ซถ
In each of the cases where the lines of the file, following the first, are not commands (ie: colon or -c), instances of open-close braces ({}) in the command will be replaced by these values. the way that works is genuinely so satisfying ๐ญ
For example, an inputfile whose contents is:
: echo {}
a
b
c
run with par like so:
%par -q inputfile
will produce the following output (order will vary โ do not come for me about the order, it's parallel, it does what it wants):
b
a
c
The command-line options are as follows:
โจ OPTIONS โจ
-Fโ Omit the footer that normally follows the output of each job. bye bye lil footer ๐-Hโ Omit the header that normally precedes the output of each job. no intro, we're jumping straight in.-cโ Command to be run on each of the arguments following the command-line options, where the first line of the input file(s) begins with a pound-sign (#).-dโ Print debugging information on standard error (stderr). Repeat the option up to three times for more verbosity. (so-dddis max yap mode, and honestly, we love a yapper)-eโ Split args by spaces, rather than usingsh -c. > Note:-eis incompatible with the-ioption. pick a lane bestie ๐-fโ No input file orSTDIN, just run a quantity of the command specified with-c.-iโ Run commands interactively through (multiple)xterm(1)processes. windows everywhere, very demure, very mindful ๐ช-lโ Prefix of logfile name, as inprefix.NwhereNis theparprocess number ([0..]).
Default: par.log.<time>.[0..]
-n Nโ Number of simultaneous processes.
Default: 3
-p Nโ PauseNseconds between running commands. a lil breather ๐ฎโ๐จ-qโ Quiet mode. Omit the typical processing logs and do not create the log files from-l, instead the children inheritstdoutandstderrfrompar.-qis mutually exclusive with the-xand-loptions and the option appearing last will take precedence. so whoever shows up last wins, periodt ๐-xโ Viewparlogs in real-time via anxterm(1). live reaction cam ๐ฅ
๐ FILES ๐
par.log.T.Nโ Log file; whereTis the current time in seconds since the epoch andNis theparprocess number ([0..]).
๐ HISTORY ๐
par was ported from the perl version. It differs in the following manner:
- If
parreceives aHUP/INT/TERM/QUITsignal, it does not print the commands that will not be run. - If
parreceived aHUP/INT/TERM/QUITsignal, it does not exit immediately after sending kill to running jobs. it waits for them to exit so that they are cleaned-up properly. If a second signal is received, it dies immediately. ๐ญ she said "not twice, bestie."
and that's the whole page, bestie!! this edition of the manual was served up on 29 July 2019, and it's par(1) from the General Commands Manual โ so if anyone asks where you learned all this, you can say the source material was dated and you still ate. ๐
โจ stay parallel, stay slay. ๐ซถ
๐ฆ where this page comes from
- alpine 3.24: rancid-doc 3.14-r0 ยท BSD-3-Clause-No-Nuclear-License-2014
- epel 9: rancid 3.13-7.el9 ยท BSD with advertising
- fedora 43: rancid 3.13-16.fc43 ยท BSD-3-Clause
- fedora 43: rancid 3.14-1.fc43 ยท BSD-3-Clause
- fedora 44: rancid 3.13-17.fc44 ยท BSD-3-Clause
- fedora 44: rancid 3.14-1.fc44 ยท BSD-3-Clause
- nixos 26.05: rancid 3.13
- nixpkgs unstable: rancid 3.13
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms