Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-30-2010, 11:22 AM
|
#1
|
Member
Registered: Jul 2009
Location: Denmark
Distribution: Fedora
Posts: 95
Rep:
|
Loosing jobs list after quitting terminal
Hello,
I think question is too simple, but its too hard to find any info on it. Question is just simple as:
I open ssh terminal into my server and run some command using 'cp /path/file /other/path/file &'. And off course this runs as background job and I can list it using jobs command. This is very good. Then I close my terminal using 'exit' and then re-enter it again using ssh and I can see the same copy job with 'ps aux', but it no more listed with 'jobs' command. How can I bring this job back to foreground and control with 'jobs' command ?
|
|
|
01-30-2010, 11:41 AM
|
#2
|
Member
Registered: Dec 2008
Location: Bellevue,WA
Distribution: RHEL 5 , Fedora ,Sabayon,Solaris,Vmware,AWS
Posts: 107
Rep:
|
Hello,
I tried your scenario in my linux computer locally , I experienced the same issue that you have reported.
Then i checked the man page of "jobs" command , it clearly stated that,
"jobs - display status of jobs in the current session"
Will check more on this ,BTW , as you can find the PID of the cp command using ps -aux command , you could do whatever you want with it.
|
|
|
01-30-2010, 11:46 AM
|
#3
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
Check out "screen". It's a virtual terminal system that will let you detach and reattach to the shell instances running in it, among other things.
|
|
|
01-30-2010, 11:48 AM
|
#4
|
Member
Registered: Jul 2009
Location: Denmark
Distribution: Fedora
Posts: 95
Original Poster
Rep:
|
How can I for example bring proccess to foreground by its PID ?
|
|
|
01-30-2010, 11:53 AM
|
#5
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
I'm not sure if it's even possible to directly import a process into a running terminal. At least I've never heard of anything like that.
Here's a page that explains the basics on how to use screen though.
http://www.rackaid.com/resources/lin...al-and-how-to/
Launch your command inside a screen terminal and you can get back to it any time.
|
|
|
All times are GMT -5. The time now is 11:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|