Wednesday 4 May 2016

For when nohup is not available

So I recently had to execute a long running job on a bash shell,
however none of my usual tools like nohup, screen or tmux were available so below is the method I used to make sure I can start the job and disconnect the session.

  1. run the job in bash
  2. whilst running press ctrl-z (this will suspend the current foreground job (task)  )
  3. enter the job control command bg to add it as a background task
  4. then remove the job from the shell's job list disown -h 
  5. exit


No comments:

Post a Comment