This will create a new wtmpx file with only the last 100 entries in it.
# /usr/lib/acct/fwtmp < /var/adm/wtmpx | tail -100 > /tmp/wtmpx.asciifwtmp parses the wtpmx file and dumps out the last 100 entries in ascii to a file.
# /usr/lib/acct/fwtmp -ic < /tmp/wtmpx.ascii > /var/adm/wtmpx
# rm /tmp/wtmpx.ascii
Rerun fwtmp with the -ic params will read this file and create an equivalent binary wtmpx file to replace yours.
Note: If fwtmp is not available on your system you'll need to install the system accounting packages SUNWaccu & SUNWaccr.
No comments:
Post a Comment