var/log/wtmp文件的作用
/var/log/wtmp也是一个二进制文件,记录每个用户的登录次数和持续时间等信息。
查看方法:
可以用last命令输出当中内容:
debian:/var/log# last
root pts/1 :0.0 Thu Jul 7 23:19 still logged in
root pts/3 :0.0 Thu Jul 7 22:31 still logged in
root pts/3 :0.0 Thu Jul 7 20:17 - 22:24 (02:06)
root pts/1 :0.0 Thu Jul 7 20:14 - 22:39 (02:24)
root:0 Thu Jul 7 20:12 still logged in
reboot system boot 2.6.10 Thu Jul 7 20:10 (03:17)
....
或者用last -f /var/log/wtmp
或
# who-u /var/log/wtmp