Unix Shell - wtmp & btmp bast way to truncate

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > November 2005 > wtmp & btmp bast way to truncate





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com