LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
[stats]
From: Kim Hawtin <khawtin@ratbaggames.com>
To : linuxsa <linuxsa@linuxsa.org.au>
Date: Fri, 19 Dec 2003 11:13:54 +1030
Re: /var/log/lastlog way too big!
Paul Shirren wrote:
> Kim Hawtin wrote:
>> davidn@rebel.net.au wrote:
>>> Francesco Peeters <Francesco@Fampeeters.com> wrote:
>>> >I have been searching whether I can simply delete it to recover from
>>> >this oversized lastlog file, but could not find a clear answer...
>>>
>>> Yes you can, however an even better idea is to truncate it using the
>>> Bash command "> /var/log/lastlog".
>>
>> From time to time I do things like;
>>
>> # mv file file-old && :> file && gzip -9 file-old
>
> Or logrotate. Really this is something you should be automating.
> Remember laziness is an important quality for a good sys admin.
I also have a tendency to use;
`date "+%Y%m%d-%H%M%S"`
on the end of such file moves in scripts...
so; mv file file`date "+%Y%m%d-%H%M%S"`
cheers,
Kim Hawtin
--
IT Systems Administrator
Ratbag
Level 8, 63 Pirie Street,
Adelaide SA 5000,
Australia
Ph +61 8 8223 5830, Fax +61 8 8223 5746
email: khawtin@ratbaggames.com
http://www.ratbaggames.com
--
LinuxSA WWW: http://www.linuxsa.org.au/ IRC: #linuxsa on irc.freenode.net
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
[stats]
Return to the LinuxSA Mailing List Information Page