Disown is your friend

Bash builtin disown is a not-so-well known [job control command] http://www.gnu.org/software/bash/manual/html_node/Job-Control-Builtins.html), and yet
it's an extremely useful one.

So what? You've started a remote ssh session, launched some command which is taking very, very long to complete, and you just want to go home, or maybe you feel your connectivity may drop, and so on... and you forgot to launch screen (possibly with [byobu] https://launchpad.net/byobu))
or tmux before starting your work!

Now you're desperate and you'd just like to go home, but you fear your longstanding jobs will quit if you close your terminal.

Just background your job, launch disown and all the jobs in background will receive no notification whatsoever of your saying goodbye to them; of course you won't be able to read their output to the terminal.

Subscribe to Alan's Lair

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe