| Author |
wtmp & btmp bast way to truncate
|
|
| Rob Bradford 2005-11-29, 5:58 pm |
|
-- All.
I have asystem whete the above file are taking up a load of space in
the /var file system. What is the best way to truncate these files?
HP-UX 11.00
any help appreciated.
Rob.B
| |
| Dan Mercer 2005-11-30, 2:50 am |
|
"Rob Bradford" <rob.bradford@virgin.net> wrote in message news:dmifet$n30$1@nwrdmz03.dmz.ncs.ea.ibs-infra.bt.com...
:
:
: -- All.
:
: I have asystem whete the above file are taking up a load of space in
: the /var file system. What is the best way to truncate these files?
:
: HP-UX 11.00
:
: any help appreciated.
:
: Rob.B
:
Go to Google Groups and Google "fwtmp mercer"
Dan Mercer
| |
| raggmopp 2005-11-30, 5:55 pm |
| The fwtmp(1M) command will convert from the binary format to a text
format and also from text back to binary (with the "-ic" option). The
wfixtmp(1M) command examines the wtmp format and corrects the time/date
stamps to make the entries consistent.
Once you have the file converted to ascii you can edit to keep what
info you want and then convert back to bin.
Or you can 'cat /dev/null > /var/adm/wtmp' file and just 0 it out
periodically.
Convert a copy to ASCII and save it, 0 out the wtmp file to start a
new.
(Use /dev/null againest the file as this is an open process)
OR, use SAM and use the 'trim' files option.
|
|
|
|