IT notes


To compress using gzip format but using all your available cores: tar --use-compress-program=pigz -cf archive.tgz /path/to/source Or if you want to pipe it: tar -cf - source | pigz > archive.tgz To decompress use tar -xvf archive.tgz as usual. The output of pigz is compatible with gzip

parallel xargs

To run a script in parallel using xargs: printf %d\\n {0..9} | xargs -n 1 -P8 sleep In this case sleep is going to be call 8 times (-P8) using has the input an int from 0 to 9. From the man: -P maxprocs Parallel mode: run at most maxprocs invocations of utility at once.


pdsh - issue commands to groups of hosts in parallel Install: brew install pdsh Usage: pdsh -R ssh -w ^servers.txt "<command>" In where servers.txt is something like: one-liner: pdsh -b -w ",," "<command>" -b Disable ctrl-C status feature so that a single ctrl-C kills parallel job. (Batch Mode)