LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-20-2006, 07:34 AM   #1
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
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,
 
Old 07-20-2006, 07:38 AM   #2
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
after you hit 'ctrl-Z', the command 'bg' takes it to the background and 'fg' brings it back to foreground as it originally was.
 
Old 07-20-2006, 08:24 AM   #3
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Original Poster
Rep: Reputation: 47
so you cant change the command itself?
ie. add a nohup so you can log out?
 
Old 07-20-2006, 08:45 AM   #4
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to bring a fg job to bg binary_0011 Linux - Newbie 3 04-19-2006 06:57 AM
How to bring back the grub of Suse tanveer Linux - General 2 05-04-2005 05:43 AM
how do i bring back windows OMEGA-DOOM Linux - Newbie 6 11-15-2004 02:06 PM
How do I bring back lost items in K menu? ihr bist weasel Mandriva 4 01-07-2004 04:36 PM
bring colors back to tex ... szmartby Programming 0 09-19-2003 10:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration