?
Solved

how to clean log files at  /var/log directory

Posted on 2003-02-20
5
Medium Priority
?
1,251 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

771 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