歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 使用last報Value too large解決

使用last報Value too large解決

日期:2017/3/1 15:36:39   编辑:關於Linux
使用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文件中找到。
Copyright © Linux教程網 All Rights Reserved