LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-26-2003, 04:37 PM   #1
jimmmac
Member
 
Registered: Oct 2002
Location: Florida
Distribution: RedHat
Posts: 109

Rep: Reputation: 15
Question about 2 files in /var/log


Good afternoon.

I have 3 files in my /var/log that are quite large. I was wondering if I could >> these files to make them much smaller. The files are

wtmp
wtmp.1
lastlog

Thanks

Jim Macdonald
 
Old 01-26-2003, 04:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
wel,l they are log files, delete them if you don't want them. are they growing all the time? if they are then it may be that your logrotate setup is failing. make sure it's runnning and that the entries in /etc/logrotate.d/ or /etc/logrotate.conf make sense (see the logrotate manpage for info on making these work diferently)
 
Old 01-26-2003, 06:10 PM   #3
jimmmac
Member
 
Registered: Oct 2002
Location: Florida
Distribution: RedHat
Posts: 109

Original Poster
Rep: Reputation: 15
Hi Acid_kewpie.

Thanks for the info. I am looking into it. One file I am not sure about is the lastlog file. That is the biggest one. I tail -100 and it looks binary. So I am not sure if I can zero it out. Thanks again.

Jim
 
Old 01-26-2003, 06:24 PM   #4
onurb
Member
 
Registered: Dec 2002
Posts: 263

Rep: Reputation: 30
Logrotate zips and rotates your logs at 4.00 in the morning. If your computer is not on 24/7 you might want to use 'anacron' ( urpmi anacron ) A program that executes tasks that are "forgotten' by cron ( like logrotate ) because your computer was not on at the time they were supposed to run.
 
Old 01-26-2003, 08:19 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Wtmp and lastlog are both login (attempt) records, they're system files. *If you don't know what a file is for, and you suspect it to be part of a package, try "apropos <search term>", "whatis <search term>" or "man -f <search term>"and if there's any reference it'll show ya.
 
  


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
/var/log/messages: Too many files open ThePreacherMan Linux - Newbie 4 06-21-2005 03:58 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 05:03 PM
/var/log question unixgeek Linux - General 1 11-24-2003 12:08 AM
/var/log files merlinxx Linux - General 1 11-02-2002 12:05 PM
How to remove files in /var/log /news and /mail keirobyn Linux - Newbie 6 07-19-2002 05:26 AM


All times are GMT -5. The time now is 10:19 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration