LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-13-2012, 07:56 PM   #1
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
switching pids


is it possible to switch between pids between terminals in a shell. not jobs.

basically what I want to be able to do is this. start a shell script on the console. and log in remotely (same account) and be able to view the output while it's running. Is there a way to do this?
 
Old 07-13-2012, 08:26 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Have you looked at screen?
It allows you to start a session then "hang up" and pick up again later, and also to access the same terminal from more than one machine.
 
Old 07-16-2012, 08:01 AM   #3
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Original Poster
Rep: Reputation: Disabled
That looks like it may work.

Thanks.
 
Old 07-16-2012, 03:24 PM   #4
psyhe
LQ Newbie
 
Registered: Mar 2006
Posts: 5

Rep: Reputation: 1
You may also try tmux - it is a cleaner implementation of the same idea (terminal multiplexing), just as stable and has saner default keybindings (the main keyboard shortcut for screen is ctrl-a, which conflicts with emacs/bash ctrl-a (goto start of line), the main shorcut for tmux is ctrl-b, which is not used by emacs/bash by default).
Example:
1) run 'tmux'
2) launch your long running processing, etc.
3) press <ctrl-b-d> ### this detaches you from the tmux session (you can also just close the terminal window)
4) login again
5) in order to attach to the previous tmux session (with the long running process in it), run 'tmux att'
btw, you can attach from several *different* logins to the same session, which is usefull for sharing a session between several users (education, remote help, etc.)
 
1 members found this post helpful.
Old 07-16-2012, 03:29 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Thanks psyhe, I'll take a look at that too as it's always nice to have an alternative.
 
  


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
Parent PIDs Sinope Linux - Newbie 6 10-05-2004 11:46 PM
C++ and PIDs dbcoder Programming 1 07-15-2004 08:58 PM
killing pids i_is_cat Linux - Newbie 6 05-01-2003 11:07 AM
Samba multiple pids The Jesus Linux - Software 1 12-11-2002 10:46 AM
Multiple PIDs ? Si|entKey Linux - General 0 03-27-2001 11:03 PM

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

All times are GMT -5. The time now is 08:18 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
Open Source Consulting | Domain Registration