PEXEC(1)
π pexec β executing commands in parallel β¨
okay bestie, welcome to pexec(1) β the user command that lets you run stuff in parallel, no cap π«Ά
πΈ SYNOPSIS
pexec [options] [-c|-m] [--] command [arguments] | 'compound command'
β¨ DESCRIPTION
So basically: pexec runs your commands or shell scripts in parallel β either all on one single host, or spread out across remote hosts by way of a remote shell. That's the whole vibe. Parallel girlbossing. π
π OPTIONS
General options
-h,--helpβ gives you the general summary about the command line options. lil snack, not the whole meal.--long-helpβ gives a detailed list of command line options. the full feast, we love a thorough queen π--versionβ gives some version information about the program.-s,--shell <shell>β the full path (like/bin/sh) of the shell or interpreter that's gonna be used for script execution.-c,--shell-commandβ use the specified shell to interpret the command(s) instead of doing direct execution.-m,--multiple-commandβ lets multiple individual shell command scripts be executed in parallel with the variation of the parameters.-e,--environment <variable>β name of an environmental variable that gets set to the respective parameter before each execution.-n,--number <number>β the maximal number of processes running simultaneously. plot twist:<number>can even be a complex specification of remote hosts (peep the documentation for more deets).-C,--control <port>β the control port of a hypervisor daemon (that's either the full path of a UNIX socket or an INET host specification).-p,--list <list>β the single-argument form of the main parameter list.-r,--parameters <list>β the multiple-argument form of the main parameter list.-f,--listfile <file>β the main parameter list file.-w,--column <index>β the column index telling pexec where the parameters should be taken from if they're read from a parameter file.-t,--completeβ treats the whole line as a single parameter when the parameters are read from a file.-z,--niceβ sets the scheduling priority of pexec and all its children (the executed processes) to the priority defined by this nice value.--β a marker, and after it the command to execute begins. like a little velvet rope π
Redirecting standard input, output and error
-i,--input <input>β the (optionally formatted) name of the input file used for redirecting the standard input.-o,--output <output>β the (optionally formatted) name of the output file used for redirecting the standard output.-u,--error <output>β the (optionally formatted) name of the output error file, used for redirecting the standard error.-R,--normal-redirectionβ equivalent to specifying--output -,--error -and--input /dev/null. one flag, three jobs, multitasking icon β¨-a,--output-format <format>β the format of the final standard output redirection, for when the output of all the processes gets gathered into the same file.-b,--error-format <format>β the same final redirection format, but for the standard error.-x,--omit-newlinesβ disables the automatic newlines after the output and error formats.
Execution using remote hosts
-g,--remote-shell <remote_shell>β the name or full path of the remote shell used to build the tunnel between the local and the peer host(s). Default:/usr/bin/ssh.-P,--pexec <pexec>β the full path of the pexec program on the remote hosts. if you skip this one, pexec tries to figure it out from the invoking syntax and/or the current path. she's resourceful like that π§-T,--tunnelβ internal use only (pexec will start up in tunnel daemon mode). don't touch, that's her private business π
Remote control, mutual exclusions and atomic command execution
-y,--bind <port>β this option lets pexec be remote controlled via INET or UNIX domain sockets.-E,--pexec-connection-variable <env>β overrides the default environment namePEXEC_REMOTE_PORTto the value you specify, which is used by the-p|--connect autocombination to determine the control socket with which the running pexec instance can be controlled.-j,--remoteβ used to remote control and/or poll the status of other running instances of pexec.-p,--connect <port>β remote control port to connect to.-t,--statusβ prints the actual status of the running jobs in a human-readable form.-l,--lock <mutex>β locks the specified mutex. if the mutex is not locked by someone else, great; otherwise it will block until the mutex is released. sit tight bestie π-u,--unlock <mutex>β unlocks the specified mutex.-m,--mutex <mutex>β name of the mutex.-d,--dump <filename>β dumps the content of the given file to standard output; if-m|--mutexis given, this will be atomic.-s,--save <filename>β saves the content of standard input to the given file; if-m|--mutexis given, this will be atomic.-a,--atomic <command>β executes the given command. if-m|--mutexis given, the execution is going to be atomic with respect to that mutex.
Hypervisor mode
-H,--hypervisorβ starts pexec in hypervisor mode.-C,--control <port>β the control port used by the hypervisor.-l,--load <window>β use load also to limit the number of simultaneous processes, with the specified load average interval (0,1or2, or1min,5minor15min, respectively).-f,--fifoβ first in first out queue processing.-s,--lifoβ last in first out (stack) queue processing. this one's the default π
Logging
-L,--log <file>β the name of the log file.-W,--log-level <level>β the logging level.-V,--verboseβ increases the log level by one.
π¦ REPORTING BUGS
Found a bug? Report it to <apal@szofi.elte.hu> β she wants to know, fr fr. π
π COPYRIGHT
Copyright Β© 2007, 2008-2009; Pal, Andras <apal@szofi.elte.hu>
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
no warranty bestie, we said what we said π
This software was written by Andras Pal. The core part was written while working for the Hungarian-made Automated Telescope (HAT) project to make the data processing more easier and therefore find many-many extrasolar planets. See more information about this project: http://hatnet.hu. Another internal libraries (e.g. numhash.[ch]) were primarily written for other projects. π
π SEE ALSO
The full documentation for pexec is maintained as a Texinfo manual. If the info and pexec programs are properly installed at your site, the command
info pexec
should give you access to the complete manual.
and that's the whole page, periodt π this was pexec 1.0rc8 (2009.07.02), dated July 2018 β mwah, iconic, go run something in parallel π«Άβ¨
π¦ where this page comes from
- ubuntu jammy: pexec 1.0~rc8-4
- ubuntu noble: pexec 1.0~rc8-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms