Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

logging and tailing

Status
Not open for further replies.

fandelem

Technical User
May 5, 2000
6
US
What is the cleanest way to erase a log file? Right now, I have it "cp -f /home/kdavis/messages /var/log/messages"
(the file in /home/kdavis is just blank) but when I try to tail it again - nothing will be logged!

What is the cleanest way to clear up 1-8000 line logfiles *and* be able to do a tail to it and have it keep logging?
[sig][/sig]
 
you can clean the file by doing:

"> filename" at the commandline,
in order to do a tail and have it keep logging do:

tail -f filename

Hope this is what you needed!!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top