Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2007
piltrafa's Avatar
Registered User
 

Join Date: Oct 2001
Location: Buenos Aires, Argentina
Posts: 77
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.
Sponsored Links
  #2 (permalink)  
Old 07-02-2007
blowtorch's Avatar
AFK
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,351
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 (permalink)  
Old 07-03-2007
Registered User
 

Join Date: Jun 2007
Posts: 25
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 (permalink)  
Old 07-03-2007
piltrafa's Avatar
Registered User
 

Join Date: Oct 2001
Location: Buenos Aires, Argentina
Posts: 77
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.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Back-to-Back Connection using HBAs aldowsary IP Networking 3 11-28-2008 10:21 PM
back to back printing in UNIX amirthraj_12 AIX 3 05-06-2008 08:42 AM
Executing Stdout ??? fawqati Shell Programming and Scripting 5 04-02-2008 04:01 PM
cut -d' ' -f7,8 on the stdout of ls -al yongho Shell Programming and Scripting 9 02-15-2007 12:28 PM
where does stdout link to? jiangyanna Filesystems, Disks and Memory 7 06-18-2003 12:22 PM



All times are GMT -4. The time now is 11:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0