LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Switch stdout between /dev/null and a file? (https://www.linuxquestions.org/questions/linux-newbie-8/switch-stdout-between-dev-null-and-a-file-188366/)

gremlin2000 06-01-2004 05:46 AM

Switch stdout between /dev/null and a file?
 
Hello,
I have a script which I run using nohup. When I run it it will (as expected) redirect the output to the file nohup. This is great because I can tail -f the file and see whats going on. I want to stop this file from filling my disk while I'm not logged in (but leave the script running) but still be able to tail -f it to see the output when I am logged in. Is there a way to switch the output from nohup between this file and /dev/null while it is running?
(or maybe use cron to truncate the file every now and then?).

Cheers,
Gremlin.

Error1312 06-01-2004 10:13 AM

I don't know the answer, but maybe this is more something to post in the programming forums.


All times are GMT -5. The time now is 03:51 AM.