LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Pause a Job - bring back as nohup? (https://www.linuxquestions.org/questions/linux-general-1/pause-a-job-bring-back-as-nohup-465876/)

rizhun 07-20-2006 07:34 AM

Pause a Job - bring back as nohup?
 
Just a quick one...

If run a command and realise it is going to take hours to run...
Is it possible to Ctrl+Z it, then bring it back the equivelant to "nohup <cmd> &" ??

Thanks,

prozac 07-20-2006 07:38 AM

after you hit 'ctrl-Z', the command 'bg' takes it to the background and 'fg' brings it back to foreground as it originally was.

rizhun 07-20-2006 08:24 AM

so you cant change the command itself?
ie. add a nohup so you can log out?

Guttorm 07-20-2006 08:45 AM

Hi

Maybe take a look (and install) "screen"? After starting it, if a process takes ages, you can just hit Ctrl+A, then C to create a new window, or Ctrl+A then D to detach. The process will then continue, and you can logout. After logging in again, you get back with "screen -r".

I've used it a lot, and using it also have the advantage that if you're disconnected for some reason, you just get "detached" so you can login again and just do a "screen -r" to continue.


All times are GMT -5. The time now is 07:32 PM.