?
Solved

how to clean log files at  /var/log directory

Posted on 2003-02-20
5
Medium Priority
?
1,299 Views
Last Modified: 2008-02-01
I'm running out disk space on my linux box, my var/log/wtmp keep growing how i can clean up this file and some log files to free up, i'm often getting error because of this. Can any body help me. What should I do, do i have to remove this file or clean up the logs.
Thanks
0
Comment
Question by:burn2fre
5 Comments
 
LVL 3

Expert Comment

by:rfr1tz
ID: 7987016
These files shouldn't get so big. How big are they?

Do a     "who /var/log/wtmp"      and see what's in the wtmp file.

0
 

Author Comment

by:burn2fre
ID: 7991445
allocated space for this is 98Mb, can I delete this file will the system create a file again
0
 
LVL 9

Accepted Solution

by:
majorwoo earned 200 total points
ID: 7993401
echo "" > /var/log/wtmp

will empty the log file, but you will want to look into why this is getting so large
0
 

Expert Comment

by:CleanupPing
ID: 9087929
burn2fre:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 9259367
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Accept majorwoo's Comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This installment of Make It Better gives Media Temple customers the latest news, plugins, and tutorials to make their Grid shared hosting experience that much smoother.
Can you run Linux on a Windows system?  Yep.  Here's how.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

594 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question