LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 01-28-2010, 03:52 PM   #1
adam999
Member
 
Registered: Sep 2006
Posts: 105

Rep: Reputation: 18
Job processes


Is is possible to move a process from one shell to another (local to remote)

e.g.

if
my_code.sh &

#jobs

[1]- Running my_code.sh &


was started on one remote shell is it possible to move it to the foreground on another shell as root or another user?

Thanks

Last edited by adam999; 01-28-2010 at 04:17 PM.
 
Old 01-28-2010, 04:24 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
No, because each instance of the shell maintains its own joblist.

You could achieve what you're after if you started the job under
the control of 'screen'
 
1 members found this post helpful.
Old 01-29-2010, 03:29 AM   #3
bohemistanbul
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Rep: Reputation: 0
hi

try "my_code.sh & > /dev/ttyX"

i m not sure that this job will be listed as ttyX's job or not.
maybe just only output will be redirected .
 
Old 01-29-2010, 06:33 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
May be able to do this with retty. I don't know where upstream is, but there are 32 bit binary packages for Debian:

http://packages.debian.org/search?keywords=retty

I used to use retty heavily before I got into the habit of using screen.

Evo2.
 
Old 01-29-2010, 11:18 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Linux/Unix has a very weak notion of "a job," if you confine yourself to simply what a shell provides. But of course, this is Linux: you don't have to "confine yourself" with regards to anything. If you need true job-management, either for a single computer or for a cluster, open-source packages to do this are very readily available.
 
Old 02-03-2010, 03:43 PM   #6
adam999
Member
 
Registered: Sep 2006
Posts: 105

Original Poster
Rep: Reputation: 18
Cheers for the help chaps, i'm going to get into the habbit of using screen, looks like its the way to go for moving a job to administer from a local to a remote box
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux cron job duplicate job question cpthk Linux - Newbie 4 09-11-2009 08:52 PM
Can you start a job without getting the job number spit back out? BrianK Linux - General 5 12-13-2007 08:09 PM
Limitations of System Processes and Oracle Processes in RHEL AS3.0 sathyguy Linux - Enterprise 0 03-02-2007 11:52 PM
monitoring active processes and identifying the required processes. gajaykrishnan Programming 2 08-13-2004 01:58 AM
Scripting job processes Netmaster0000 Linux - Networking 1 12-12-2003 09:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:06 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