Thursday, March 15, 2012

Linux issue multiple processes on the same line

Run commands serially, no matter if they fail or not:
$ command1; command2;


Run commands serially, conditional on correct execution:
$ command1 && command2


Run multiple commands in background:
$ command1 & command2 &


http://www.skorks.com/2010/05/executing-multiple-commands-a-bash-productivity-tip/

How to run jobs in the background on Linux over SSH

Start the process in the background
$ command &


View running jobs
$ jobs


Disown it
$ disown %1


Now when you log off, your job will still be running in the background when you come back.


More information about disown is found on the bash man page ("man bash").


http://www.quantprinciple.com/invest/index.php/docs/tipsandtricks/unix/jobcontrol/