* [gentoo-user] what is /var/log/wtmp ?
@ 2011-03-25 13:28 Philip Webb
2011-03-25 13:44 ` Einux
2011-03-25 13:48 ` Alex Schuster
0 siblings, 2 replies; 7+ messages in thread
From: Philip Webb @ 2011-03-25 13:28 UTC (permalink / raw
To: Gentoo User
In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp .
It is in binary format & is updated when I reboot.
Can anyone explain what it's for & whether it cb safely deleted ?
--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] what is /var/log/wtmp ?
2011-03-25 13:28 [gentoo-user] what is /var/log/wtmp ? Philip Webb
@ 2011-03-25 13:44 ` Einux
2011-03-25 13:48 ` Alex Schuster
1 sibling, 0 replies; 7+ messages in thread
From: Einux @ 2011-03-25 13:44 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 691 bytes --]
this file stores previous login sessions since the system existed.
It's OK to delete that file if only for regular use.
On Fri, Mar 25, 2011 at 9:28 PM, Philip Webb <purslow@ca.inter.net> wrote:
> In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp .
> It is in binary format & is updated when I reboot.
>
> Can anyone explain what it's for & whether it cb safely deleted ?
>
> --
> ========================,,============================================
> SUPPORT ___________//___, Philip Webb
> ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
> TRANSIT `-O----------O---' purslowatchassdotutorontodotca
>
>
>
--
Best Regards,
Einux
[-- Attachment #2: Type: text/html, Size: 1157 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] what is /var/log/wtmp ?
2011-03-25 13:28 [gentoo-user] what is /var/log/wtmp ? Philip Webb
2011-03-25 13:44 ` Einux
@ 2011-03-25 13:48 ` Alex Schuster
2011-03-25 14:16 ` Philip Webb
1 sibling, 1 reply; 7+ messages in thread
From: Alex Schuster @ 2011-03-25 13:48 UTC (permalink / raw
To: Gentoo User
Philip Webb writes:
> In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp
> . It is in binary format & is updated when I reboot.
> Can anyone explain what it's for & whether it cb safely deleted ?
It tracks logins, you can use the 'last' command to show its contents. I'm
pretty sure it's safe to delete it, but you should create it as empty file
afterwards (touch /var/log/wtmp), otherwise the system will not make use of
it again.
If wou want to get the space, I suggest compressing the file, it will be
much much smaller then:
bzip2 -v /var/log/wtmp
touch /var/log/wtmp
Also see the man pages for wtmp and last.
Wonko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] what is /var/log/wtmp ?
2011-03-25 13:48 ` Alex Schuster
@ 2011-03-25 14:16 ` Philip Webb
2011-03-25 14:37 ` Paul Hartman
0 siblings, 1 reply; 7+ messages in thread
From: Philip Webb @ 2011-03-25 14:16 UTC (permalink / raw
To: gentoo-user
110325 Alex Schuster wrote:
> Philip Webb writes:
>> In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp
>> . It is in binary format & is updated when I reboot.
>> Can anyone explain what it's for & whether it cb safely deleted ?
> It tracks logins, you can use the 'last' command to show its contents.
> I'm pretty sure it's safe to delete it,
> but you should create it as empty file afterwards
> -- 'touch /var/log/wtmp' -- ,
> otherwise the system will not make use of it again.
> If wou want to get the space, I suggest compressing the file,
> it will be much much smaller then:
>
> bzip2 -v /var/log/wtmp
> touch /var/log/wtmp
>
> Also see the man pages for wtmp and last.
Thanks & to the other respondent. I'll decide how to handle it.
--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] what is /var/log/wtmp ?
2011-03-25 14:16 ` Philip Webb
@ 2011-03-25 14:37 ` Paul Hartman
2011-03-26 14:59 ` Philip Webb
0 siblings, 1 reply; 7+ messages in thread
From: Paul Hartman @ 2011-03-25 14:37 UTC (permalink / raw
To: gentoo-user
On Fri, Mar 25, 2011 at 9:16 AM, Philip Webb <purslow@ca.inter.net> wrote:
> 110325 Alex Schuster wrote:
>> Philip Webb writes:
>>> In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp
>>> . It is in binary format & is updated when I reboot.
>>> Can anyone explain what it's for & whether it cb safely deleted ?
>> It tracks logins, you can use the 'last' command to show its contents.
>> I'm pretty sure it's safe to delete it,
>> but you should create it as empty file afterwards
>> -- 'touch /var/log/wtmp' -- ,
>> otherwise the system will not make use of it again.
>> If wou want to get the space, I suggest compressing the file,
>> it will be much much smaller then:
>>
>> bzip2 -v /var/log/wtmp
>> touch /var/log/wtmp
>>
>> Also see the man pages for wtmp and last.
>
> Thanks & to the other respondent. I'll decide how to handle it.
"man wtmp" will also give you much detailed info about what's in the
file, which programs write to it, how to use it in your own programs,
etc. in case you're interested in that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] what is /var/log/wtmp ?
2011-03-25 14:37 ` Paul Hartman
@ 2011-03-26 14:59 ` Philip Webb
2011-03-26 15:24 ` [gentoo-user] " Jörg Schaible
0 siblings, 1 reply; 7+ messages in thread
From: Philip Webb @ 2011-03-26 14:59 UTC (permalink / raw
To: gentoo-user
110325 Alex Schuster wrote:
> Philip Webb writes:
>> In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp
>> Can anyone explain what it's for & whether it cb safely deleted ?
> It tracks logins, you can use the 'last' command to show its contents.
> If wou want to get the space, I suggest compressing the file,
> bzip2 -v /var/log/wtmp
Yes! -- it fell from 24 MB to 444 KB ! -- most of it is repetitious.
It's just started a new 'wtmp' after a reboot, good for another 4,5 yr .
--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: what is /var/log/wtmp ?
2011-03-26 14:59 ` Philip Webb
@ 2011-03-26 15:24 ` Jörg Schaible
0 siblings, 0 replies; 7+ messages in thread
From: Jörg Schaible @ 2011-03-26 15:24 UTC (permalink / raw
To: gentoo-user
Philip Webb wrote:
> 110325 Alex Schuster wrote:
>> Philip Webb writes:
>>> In /var/log/ there is a file wtmp , which is 24 MB & owned by utmp
>>> Can anyone explain what it's for & whether it cb safely deleted ?
>> It tracks logins, you can use the 'last' command to show its contents.
>> If wou want to get the space, I suggest compressing the file,
>> bzip2 -v /var/log/wtmp
>
> Yes! -- it fell from 24 MB to 444 KB ! -- most of it is repetitious.
> It's just started a new 'wtmp' after a reboot, good for another 4,5 yr .
Simply install logrotate. It delivers already a setup to clean it up once a
month automatically.
- Jörg
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-26 15:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-25 13:28 [gentoo-user] what is /var/log/wtmp ? Philip Webb
2011-03-25 13:44 ` Einux
2011-03-25 13:48 ` Alex Schuster
2011-03-25 14:16 ` Philip Webb
2011-03-25 14:37 ` Paul Hartman
2011-03-26 14:59 ` Philip Webb
2011-03-26 15:24 ` [gentoo-user] " Jörg Schaible
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox