[Nottingham] If you like xargs...
Martin
martin at ml1.co.uk
Thu Nov 11 22:35:47 UTC 2010
Then you'll just love:
parallel
Excellent great GNU-ness to run commands in parallel across multiple CPU
cores or even across multiple remote machines.
parallel to form your own mini-HPC cluster?! :-)
If you need to do the same operation on a number of files, then I rather
like the form:
parallel -j +0 -m command args ::: *
where "command args" is your command and options;
* (or whatever) globs to the list of files you want to process;
the "-j +0 -m" divides all the file names across one instantiation per
processor core.
Leave out the "-m" to have just one file name given to each command
instance.
It even reassembles any output into the correct order as though all the
jobs were run sequentially.
See:
http://savannah.gnu.org/projects/parallel
In the man page, there's even links to YouTube vids of what to do!
Cheers,
Martin
--
----------------
Martin Lomas
martin at ml1.co.uk
----------------
More information about the Nottingham
mailing list