Click to See Complete Forum and Search --> : /dev/null ?


Tyr-7BE
03-26-2001, 09:04 PM
Is there a way to see what's being directed to /dev/null? I just want to direct to /dev/null but still see what's coming out. I know this kinda defeats the purpose, but I have some suspicions that some things being directed there aren't going on.

bdg1983
03-26-2001, 09:08 PM
I doubt it. It's the bit bucket. What goes there disappears.

Anyone else?

Derango
03-26-2001, 10:04 PM
Nothing comes out of /dev/null. SOmthing goes in, nothing goes out.. Its all gone.

njcajun
03-26-2001, 10:39 PM
can you maybe use the 'tee' command? I haven't used it in awhile, but I know it sends data to stdout and also to a user-specified place, which I imagine could be /dev/null.... do a 'man' on it to be sure, though.

njcajun
03-26-2001, 10:40 PM
Actually, now that I think about it, why not just test your script by commenting out the '>/dev/null' line temporarily and letting that stuff come to stdout or to a file or something?

Tyr-7BE
03-26-2001, 10:50 PM
I was thinking of that...what it is is genome and folding at home (http://gah.stanford.edu/ http://foldingathome.stanford.edu/ ...good stuff :)). I'm trying to run them as background procs so that I don't have to have a terminal open all the time. I use the command ./gahclient.x > /dev/null &, making it a background proc with no output. I run both clients and close the terminal window. The problem is when I look at gkrellm. The CPU meter never moves from zero. I wait and wait to see if anything happens, but nada. Then I open up GTop and take a look at the CPU for both of the procs. They're both sitting at zero. Then after a few seconds of staring at them from GTop, they jump to life with 44 and 88 and other high numbers like that. As soon as I close GTop, it's back to zero. This trend continues however many times it's repeated. What's the device that I should be using if I want to redirect the output to the console. Is it a tty? I figure I'll just kill X and see what's going on behind the scenes so I can make sure that the things are actually working in the background (super-beta products, but for a very good cause IMO).

Neo Wong
03-27-2001, 05:32 AM
Hey,I think you should try
./yourprog 2>&1 /dev/null &
here '2>&1' means both normal infomation
and error messages.Then throw them to
/dev/null,that makes you see nothing.
May this helps. :)