Ottawa Valley SAGE

Providing a forum since 1998

Dec 2, 2010 - 1 minute read - Comments

Some info for the CLI savvy

I saw a reference to a site on one of my emails or feeds earlier that gave this URL: http://www.quora.com/Linux/What-are-some-time-saving-tips-that-every-Linux-user-should-know

In a fit of “might be something out there”, I had a look and discovered a bash built-in that I had never run across before, disown. Take a look at the bash manpage for this little gem, but the nutshell version is that it will take a command that you either forgot to run nohup on or screen before you ran it and with some optional parameters, you can take a long running process, background it, run disown -h <jobid> and all of a sudden, you can disassociate the job with your terminal, allowing it to ignore SIGHUP and continue on even if you log out. While I am aware that there are other mechanisms, exiting a remote session and having ssh wait for exit is annoying. I know you can type ~& to background, but which level of ssh are you backgrounding?

While I use screen for all of this stuff normally, and I’m thinking of investigating bamboo as a modern version, this is still a very useful trick for those Homer Simpson moments.

Post November Meeting Info Annual Social

comments powered by Disqus