Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
PARALLEL(1)			    moreutils			     PARALLEL(1)

NAME
     parallel - run programs in parallel

SYNOPSIS
     parallel [options] [command]-- [argument ...]

     parallel [options]-- [command ...]

DESCRIPTION
     parallel  runs the specified command, passing it a single one of the speci-
     fied arguments. This is repeated for each argument. Jobs may be run in par-
     allel. The default is to run one job per CPU.

     If no command is specified before the --, the commands after it are instead
     run in parallel.

OPTIONS
     -j maxjobs
	 Use to limit the number of jobs that are run at the same time.

     -l maxload
	 Wait as needed to avoid starting new jobs when the system's load  aver-
	 age is not below the specified limit.

     -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  re-
	 placed with the argument.

     -n
	 Number  of  arguments to pass to a command at a time. Default is 1. In-
	 compatible with -i

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  an-
     other  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.

     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.

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.)

NOTES
     All output to stdout and stderr is serialised through a  corresponding  in-
     ternal pipe, in order to prevent annoying concurrent output behaviour. Note
     that serialisation is not done on any other file descriptors and file posi-
     tion  based  access  to a nonstandard file descriptor might have unexpected
     results.

AUTHOR
     Tollef Fog Heen

moreutils			   2009-07-02			     PARALLEL(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=moreutils-parallel&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help