Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-01-2004, 05:46 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 5

Rep: Reputation: 0
Switch stdout between /dev/null and a file?

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?).

Old 06-01-2004, 10:13 AM   #2
Registered: Feb 2004
Location: Belgium
Distribution: Ubuntu 10.04 Lucid Lynx
Posts: 140

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


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
What would happen if I where to cat /dev/mem > /dev/null Joey.Dale Linux - General 11 07-26-2009 12:46 PM
write errors to log file, instead of /dev/null c_r2005 Linux - General 2 07-30-2005 08:34 AM
What applicability of a file /dev/null ukrainet Linux - Newbie 1 12-01-2004 09:04 AM
mv c:\WINDOWS /dev/null; mount /dev/hda treehead Member Intro 5 10-19-2004 08:53 AM
Switch stdout between /dev/null and a file? gremlin2000 Linux - General 2 06-08-2004 07:12 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:35 PM.

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