作者:ifx0448363 | 2021-08-03 15:00
使用last报Valuetoolarge解决$last|more/var/adm/wtmpx:Valuetoolargefordefineddatatype#cd/var/adm#/usr/lib/acct/fwtmp<wtmpx>wtmpx.asciieditwtm
使用last报Value too large解决
$ last | more
/var/adm/wtmpx: Value too large for defined data type
# cd /var/adm
# /usr/lib/acct/fwtmp < wtmpx > wtmpx.ascii
edit wtmpx.ascii by "vi" or "tail"
# /usr/lib/acct/fwtmp -ic < wtmpx.ascii > wtmpx
# rm wtmpx.ascii
——————————————————————
# cp /var/adm/wtmpx /var/adm/wtmpx.old
# > /var/adm/wtmpx
按照这个方法清空了wtmpx文件
ksh下
# logadm -w wtmpx -c -C 3 -p 1m /var/adm/wtmpx
Where :
-w writes an entry in the /etc/logadm.conf file with entry name "wtmpx".
-c is a flag to copy and then truncate the file
-C is the number of copies to keep
-p is the retention period (one month here)
可以限制last保存的时长
另外,LINUX下的last文件可在/var/log/下的wtmp文件中找到。