LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
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.
 
Old 06-01-2004, 11:13 AM   #2
Error1312
Member
 
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.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration