Chinaunix首页 | 论坛 | 博客
  • 博客访问: 611691
  • 博文数量: 150
  • 博客积分: 1132
  • 博客等级: 少尉
  • 技术积分: 2067
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-11 16:46
文章分类

全部博文(150)

文章存档

2015年(15)

2014年(75)

2013年(4)

2012年(56)

分类: 网络与安全

2014-06-11 11:52:27

功能:显示最近的登录记录。
原理:last 搜索 /var/log/wtmp 文件;lastb 搜索 /var/log/btmp 文件。
用法:
-num This is a count telling last how many lines to show.
-n num The same.
-t YYYYMMDDHHMMSS
   Display the state of logins as of the specified time.
-f file   Specifies a file to search other than /var/log/wtmp
-R   Suppresses the display of the hostname field.
-a  Display the hostname in the last column. Useful in combination with the next flag.
-d For non-local logins, Linux stores not only the host name of the remote host but its IP number as well. This option translates the IP number back into a hostname.

The file wtmp and btmp might not be found. The system only logs information in these files if they are present. This is a local configuration issue. If you want the files to be used, they can be created with a simple touch(1) command.
阅读(527) | 评论(0) | 转发(0) |
0

上一篇:对 Go channel 的理解

下一篇:i386和i686(转载)

给主人留下些什么吧!~~