/var/log/wtmp文件的作用
2015-06-05 10:44
302 查看
/var/log/wtmp是一个二进制文件,记录每个用户的登录次数和持续时间等信息
查看方法:
用last命令输出当中内容:
查看方法:
用last命令输出当中内容:
[root@mail log]# last root pts/0 192.168.80.117 Fri Jun 5 14:48 still logged in root tty1 Fri Jun 5 14:48 still logged in reboot system boot 2.6.32-431.el6.x Fri Jun 5 14:47 - 15:50 (01:02) root pts/3 maweidong Thu Jun 4 22:03 - down (00:25) root pts/2 maweidong Thu Jun 4 20:12 - down (02:16) root pts/1 maweidong Thu Jun 4 19:56 - down (02:32) root pts/0 maweidong Thu Jun 4 19:25 - 22:07 (02:41)
或者用last -f /var/log/wtmp [root@mail log]# last -f wtmp root pts/0 192.168.80.117 Fri Jun 5 14:48 still logged in root tty1 Fri Jun 5 14:48 still logged in reboot system boot 2.6.32-431.el6.x Fri Jun 5 14:47 - 15:39 (00:51) root pts/3 maweidong Thu Jun 4 22:03 - down (00:25) root pts/2 maweidong Thu Jun 4 20:12 - down (02:16) root pts/1 maweidong Thu Jun 4 19:56 - down (02:32) root pts/0 maweidong Thu Jun 4 19:25 - 22:07 (02:41) root tty1 Thu Jun 4 19:25 - down (03:04)
或 [root@mail log]# who -u wtmp root tty1 2015-05-29 18:43 00:50 1019 root pts/0 2015-05-29 18:51 . 2438 (maweidong) root pts/1 2015-05-29 20:35 ? 2613 (maweidong) root tty1 2015-05-29 21:44 00:50 1112 root pts/0 2015-05-29 21:44 . 1216 (maweidong) root tty1 2015-06-01 16:17 00:50 1097 root pts/0 2015-06-01 16:17 . 1204 (maweidong)
相关文章推荐
- UML类图几种关系的总结
- Android中canvas.save()和canvas.restore()的使用
- Zero-shot learning on the ImageNet of over 20000 classes
- Codeforces Round #306 (Div. 2)
- HDU- 2039、1720
- cf306 C. Divisibility by Eight(数学推导)
- c# p2p 穿透(源码加密)
- 8大排序算法图文讲解
- PostgreSQL安装详细步骤(windows)[转]
- 黑马程序员-为梦想而努力!
- 磁盘分区 格式化 挂载
- 大家开发完APP有检测过漏洞吗?
- 携程去哪儿合并破裂的两大原因
- python 的sqlite3连接模块用法
- 知名应用背后的第三方开源项目
- linux下查看磁盘空间
- UIScrollView的使用大全
- 【swift】15-0604 类和结构体
- android 回调函数的使用
- MySQL事物系列:3:innodb_flush_log_at_trx_commit小实验