Archive

Archive for October, 2012

Linux Job Control: Foreground, Background, Disown, Nohup and Wait

October 30th, 2012 No comments

Started a job but wish you’d put into background?
Control-Z (stop the job)
> bg (run stopped job in background)
> disown %1 (ensure job doesn’t die if console accidentally closed
but next time use nohup (no hangups)
> nohup php reallylongjob.php &
want to start a second job when this finishes?
> wait %1 && php finish.php

Categories: linux Tags: