LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 04:52 PM   #1
adam999
Member
 
Registered: Sep 2006
Posts: 102

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 05:17 PM.
 
Old 01-28-2010, 05:24 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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, 04: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, 07:33 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
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, 12:18 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,606
Blog Entries: 4

Rep: Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997Reputation: 2997
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, 04:43 PM   #6
adam999
Member
 
Registered: Sep 2006
Posts: 102

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:52 PM
Can you start a job without getting the job number spit back out? BrianK Linux - General 5 12-13-2007 09:09 PM
Limitations of System Processes and Oracle Processes in RHEL AS3.0 sathyguy Linux - Enterprise 0 03-03-2007 12:52 AM
monitoring active processes and identifying the required processes. gajaykrishnan Programming 2 08-13-2004 02:58 AM
Scripting job processes Netmaster0000 Linux - Networking 1 12-12-2003 10:34 PM

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

All times are GMT -5. The time now is 09:48 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration