Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 03-05-2004, 07:35 PM   #1
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, 07:45 PM   #2
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.

Old 03-06-2004, 06:45 PM   #3
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.

[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:
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. <>
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

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

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


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

All times are GMT -5. The time now is 12:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration