LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 03: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, 03:40 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 05: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, 05: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, 07:19 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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



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

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

All times are GMT -5. The time now is 07:41 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