kmx.io/runj/README.md

Tag

Download

runj v0.1

Run a command with multiple processes.

Example

Try this to clean-up space on your hard drive (choose NVme for faster speed).

# cd / && find -d -print0 | runj 8 xargs -0 rm -f

This will run 8 parallel xargs -0 rm -f processes.

Try this to speed up any shell script (warning, do not try this at home or on Linux) !

runj < MyScript.sh 32 sh -c

This will run sh full speed on your 32 core server.

More seriously, I needed to speed up my test infrastructure which is shell-based and want to run commands in parallel. -1 will use all the available cores.

runj < tests -1 ./test-runner

Simple as that and MP-safe.


Source

Download