LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2004, 08:35 PM   #1
xtravar
LQ Newbie
 
Registered: Mar 2004
Distribution: Mandrake
Posts: 12

Rep: Reputation: 0
redirect stdin/stdout of running process


Is there a way to redirect standard input and output after a process is running? I'm well aware of how to do it when starting a process; however, what I want to do is 'check up' on a program that's running under a separate session or in the background.

Google failed me on this one so I thought I'd try here.

Thanks in advance.
 
Old 03-05-2004, 08:45 PM   #2
Snags
LQ Newbie
 
Registered: Mar 2004
Posts: 1

Rep: Reputation: 0
Checking up on a process

I don't know of a way to attach to the standard input/output of a process, unless it is in the /proc filesystem. But to check up on a running process, I tend to do the following:

command > output
tail -f output

Then I can log in remotely and tail the output, even if it is still scrolling on the original screen.

-Snags
 
Old 03-06-2004, 07:45 PM   #3
cetialphav
Member
 
Registered: Sep 2003
Location: Raleigh, NC, USA
Distribution: Fedora
Posts: 88

Rep: Reputation: 16
Yeah I usually use tail, too. But sometimes you need something more powerful and sophisticated.

That is where screen comes in. It has some very powerful capabilities and it is probably already installed. At least it is for me.

Quote:
[todd@perl]$ rpm -qi screen
Name : screen Relocations: (not relocateable)
Version : 3.9.15 Vendor: Red Hat, Inc.
Release : 11 Build Date: Thu Jul 10 15:25:18 2003
Install Date: Sat Dec 27 20:37:03 2003 Build Host: porky.devel.redhat.com
Group : Applications/System Source RPM: screen-3.9.15-11.src.rpm
Size : 738578 License: GPL2
Signature : DSA/SHA1, Tue Oct 28 17:40:14 2003, Key ID b44269d04f2a6fd2
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL : http://www.gnu.org/software/screen
Summary : A screen manager that supports multiple logins on one terminal.
Description :
The screen utility allows you to have multiple logins on just one
terminal. Screen is useful for users who telnet into a machine or are
connected via a dumb terminal, but want to use more than just one
login.

Install the screen package if you need a screen manager that can
support multiple logins on one terminal.
 
Old 03-06-2004, 08:54 PM   #4
xtravar
LQ Newbie
 
Registered: Mar 2004
Distribution: Mandrake
Posts: 12

Original Poster
Rep: Reputation: 0
Screen is exactly what I was looking for. Thanks.
 
  


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
TCSH: redirect stdout and stderr seperately ugenn Linux - General 3 02-07-2016 04:23 PM
redirect AND print stdout samel_tvom Programming 12 10-07-2012 06:37 PM
stdout stdin Furlinastis Linux - Newbie 3 08-12-2005 12:00 AM
redirecting stdin and stdout with pipes: convincing apps they're for a terminal? prell Programming 1 09-02-2004 07:38 AM
stdin -> port -> stdout acid_kewpie Linux - Networking 5 04-12-2002 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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