查询自wtmp文件创建以来登陆到系统的用户名单
时间:2010-11-04 来源:tyousl
用last命令可以查询自wtmp文件创建以来登陆到系统的用户名单
[root@localhost shell]# last
root pts/0 192.168.1.21 Thu Nov 4 22:06 still logged in
root pts/0 192.168.1.21 Thu Nov 4 21:12 - 21:12 (00:00)
root pts/0 192.168.1.21 Fri Nov 5 04:47 - 21:12 (-7:-35)
root tty1 Fri Nov 5 04:27 still logged in
reboot system boot 2.6.33.3-85.fc13 Fri Nov 5 04:23 - 22:30 (-5:-52)
root pts/0 192.168.1.21 Mon Nov 1 07:47 - crash (3+20:35)
root tty1 Mon Nov 1 07:34 - crash (3+20:48)
reboot system boot 2.6.33.3-85.fc13 Mon Nov 1 07:32 - 22:30 (3+14:58) wtmp begins Mon Nov 1 07:32:27 2010
[root@localhost shell]#
显示了用户名,登录端口,用户登录地点,登录/注销时间以及会话持续时间
root pts/0 192.168.1.21 Thu Nov 4 22:06 still logged in
root pts/0 192.168.1.21 Thu Nov 4 21:12 - 21:12 (00:00)
root pts/0 192.168.1.21 Fri Nov 5 04:47 - 21:12 (-7:-35)
root tty1 Fri Nov 5 04:27 still logged in
reboot system boot 2.6.33.3-85.fc13 Fri Nov 5 04:23 - 22:30 (-5:-52)
root pts/0 192.168.1.21 Mon Nov 1 07:47 - crash (3+20:35)
root tty1 Mon Nov 1 07:34 - crash (3+20:48)
reboot system boot 2.6.33.3-85.fc13 Mon Nov 1 07:32 - 22:30 (3+14:58) wtmp begins Mon Nov 1 07:32:27 2010
[root@localhost shell]#
显示了用户名,登录端口,用户登录地点,登录/注销时间以及会话持续时间
相关阅读 更多 +