stdout back to tty


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers stdout back to tty
# 1  
Old 07-02-2007
stdout back to tty

Hi everyone!

Well, this is the thing.. I sent a process's stdout to /dev/null. This process
is very time consuming and after a week it keeps running, what I need is
to switch the stdout back to screen to see what's going on.
Anyone know if it's possible and how to do it?

Thanks and regards.
# 2  
Old 07-02-2007
afaik, you cannot do that. Once the process starts with all the file descriptors in place, unix will not allow you to do this. You can setup some sort of mechanism where on receiving a signal, your process also writes whatever it is writing to stdout to another file.
But it will be a lot of work, so it just might make more sense to redirect stdout to a file and keep truncating it every so often (you could have a cronjob) till you need to see what the process is doing. When you do, stop truncating the file and whatever you need to check is just waiting in that file.
# 3  
Old 07-03-2007
You can do it with tee !!!!!!!!!!!!

Hi


I m not sure that this is your requirement . however i m trying if it works for you its good !!!!

the solution to your problem is using tee command but for that you will have to run the code from beginning
not in middle . suppose you are using less command to see any file
then you can send the output to the file and also to your terminal as follows

Code:
less abc.log | tee /dev/pts10 xyz.txt| less


this will send your 1 output to your terminal . other output to the file xyz.txt
# 4  
Old 07-03-2007
Thanks guys

Ok, thanks for the help. As I understand the less would be an option, but before the command was triggered. Anyway, I will kill the process and re-run it with stdout>/dev/tty0. Logging to a file is not an option, cause I'm running fcrackzip, and its going to fill my hard disk in minutes. ;-)

Thanks again.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. UNIX for Advanced & Expert Users

tty changes?

I am not sure if I am using the correct terminology but somehow my tty keeps changing on me. The man pages are confusing to me on what exactly the tty is. This is what I see when I run the tty command. Could anyone explain why my tty keeps changing? ~ $ tty /dev/pts/1 ~ $ tty /dev/pts/0 (6 Replies)
Discussion started by: cokedude
6 Replies

3. Programming

how to redirect back to stdout

In my program, I am using library provided by other. In the library, the cout/cerr is redirected to a file (the file path is known). After I call some methods in the library, I get one side-effect --> The cout/cerr in my own program is also directed to the file. So how can I to redirect... (5 Replies)
Discussion started by: princelinux
5 Replies

4. IP Networking

Back-to-Back Connection using HBAs

Hi every body, Is it possible to connect two servers Back-to-Back (Point-to-Point) using HBA adapters & using Fiber. Note it is direct connection & there is no switches between the servers. I'm concern about using HBA adapters, it is possible or not. Thanks in advance. :) (3 Replies)
Discussion started by: aldowsary
3 Replies

5. UNIX for Dummies Questions & Answers

How to put the STDOUT back to terminal

I have put the file descriptor 1 to file, using command exec 1>>out.txt Then I could not see any output on the screen, how could I restore the default output to terminal? :mad: Thanks (3 Replies)
Discussion started by: biglau
3 Replies

6. AIX

back to back printing in UNIX

Hi , Can you suggest me how to back to back printing in UNIX? Is there any way? Kindly advise. Regards Vijaya Amirtha Raj (3 Replies)
Discussion started by: amirthraj_12
3 Replies

7. AIX

tty

Hi All can anyone tell me what is the meaning of tty,or give me an example of this? (1 Reply)
Discussion started by: magasem
1 Replies

8. UNIX for Dummies Questions & Answers

tty remote IP

I am fairly new to Unix Terminal outputs and I have a server that is sending print jobs to a PortServer 8 RJ45 situated in a remote location. It is working fine however we need to change the Subnet of that location and I am unable to find where the IP associated with the terminal is located. ... (4 Replies)
Discussion started by: martin_Montreal
4 Replies
Login or Register to Ask a Question