LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 06-11-2002, 01:12 PM   #1
ifm
Member
 
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Rep: Reputation: 15
Question lastlog - What is it, and how do I rotate it?


My /var/log/lastlog file is getting mighty huge, and I was wondering how I go about rotating it successfully?

If I ever delete the file, or rename it, or have a logrotate.d file rotate it weekly/daily etc... then I get errors in "/var/log/messages" when logging into the machine that it couldnt properly update lastlog or find it.

The file is sucking down way too many mb, and the server has only been running for three days! I would hate to see how big it gets in a week, or a month of operation.

Any ideas?
 
Old 06-11-2002, 01:40 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Try this site, as a good example of logrotate: http://www.yolinux.com/TUTORIALS/Lin....html#LOGFILES

Also, have you tried maybe just deleting the lastlog file and recreating it, then restarting the syslogd process (someone correct me if I am wrong on that process) ?
 
Old 04-19-2011, 06:06 AM   #3
aasami
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Rep: Reputation: 0
Exclamation Do not rotate lastlog!

According to Wikipedia lastlog should NOT be rotated. (search for "lastlog" inthere)
There is no reason to do that, because it's not that big as "ls -l" shows.
Use "ls -sh" to see real space needed on HDD.
 
Old 04-19-2011, 06:22 AM   #4
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
this thread is like 9 years old (almost)... i don't know it is necessary to answer on these sort of old threads ?
 
Old 04-19-2011, 06:48 AM   #5
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Quote:
i don't know it is necessary to answer on these sort of old threads ?
It's far more preferable to start a new thread. There are a few very rare exceptions, but this isn't one of them.

Replying to an old thread often causes confusion with new info vs. old info, i.e. what once worked (or didn't work) when the thread was started could not work (or work) now, amongst other disparities.

Last edited by MrCode; 04-19-2011 at 06:51 AM.
 
Old 04-19-2011, 07:06 AM   #6
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
Quote:
Originally Posted by MrCode View Post
It's far more preferable to start a new thread. There are a few very rare exceptions, but this isn't one of them.

Replying to an old thread often causes confusion with new info vs. old info, i.e. what once worked (or didn't work) when the thread was started could not work (or work) now, amongst other disparities.
that's what i mean... i think it was unnessecary from aasami to answer on this thread?!
 
Old 04-19-2011, 08:38 AM   #7
tradetoprofit
LQ Newbie
 
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
When you found a solution that works for you, post it so the person who comes after you also know what can be a solution
2) After posting that, mark your thread as SOLVED
3) Don't forget all the people who helped you, even it was a tiny bit -> adding rep to those persons
 
Old 04-19-2011, 08:42 AM   #8
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Quote:
Originally Posted by tradetoprofit View Post
...
Hi,

Please, no spam! Reported.

Kind regards,

Eric

Last edited by Tinkster; 04-19-2011 at 01:35 PM. Reason: Next time please don't stand in a dog-pile, just tell us about it; that way I don't have to delete the post AND your quote
 
Old 04-19-2011, 08:50 AM   #9
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
a post to the admins...
can someone of you please CLOSE this thread... there is nothing said here that is relevant to this topic and i don't think there will be any in the future...
 
Old 04-22-2011, 10:45 AM   #10
aasami
LQ Newbie
 
Registered: Apr 2011
Posts: 17

Rep: Reputation: 0
Arrow Why to reply to old threads

The reason I replied to this old thread is, I was looking for the answer to the same question which is asked above, and when I found the answer, I wanted to share it with future visitors of this thread. If I have had found the answer here (in this so old thread) I wouldn't have to look further. I just hope this helped, or will help someone looking for the same.
 
  


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
chkrootkit / lastlog Mr. Gone Linux - Security 4 10-13-2005 11:50 AM
lastlog root entry Mr. Gone Linux - Security 2 11-11-2004 04:07 PM
lastlog is bloody EEUUGE ... heh. ifm Linux - Newbie 3 12-05-2002 02:41 PM
another lastlog question ericn Linux - Security 1 12-30-2001 02:34 PM
lastlog command iquadri1 Linux - Networking 0 09-29-2001 02:14 PM


All times are GMT -5. The time now is 08:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration