Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

/var/adm/wtmp ... what does it do ?

Status
Not open for further replies.

TSch

Technical User
Jul 12, 2001
557
DE
Hi folks,

I was wondering...

What's the function of the file

/var/adm/wtmp ?

It's been growing quite large by now and I'd like to delete the content ...

Is it safe to do so or will this interrupt some vital functions of our system (AIX 4.3.3 by the way) ?

Thanks in advance !

Regards
Thomas
 
hi,

wtmp holds information about user & accounting information
when you run commands like, last,who , write , login

you can trim this file using the fwtmp utility
do man fwtmp

basically , you convert this binary file to ascii , then trim the file e.g. tail -500 filename > newfile
then convert the file back

This is entry in man page of fwtmp

/usr/sbin/acct/fwtmp < /var/adm/wtmp > dummy.file
then trim dummy.file which is ascii format

write back dummy file to binary format
/usr/sbin/acct/fwtmp -ic < dummy.file > /var/adm/wtmp

fwtmp is part of bos.acct fileset

hth

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top