Linux lastb命令

Linux 教程 · 2019-02-16 14:43:24

Linux lastb命令用于列出登入系统失败的用户相关信息。

单独执行lastb指令,它会读取位于/var/log目录下,名称为btmp的文件,并把该文件内容

记录的登入失败的用户名单,全部显示出来。

语法

lastb [-adRx][-f <记录文件>][-n <显示列数>][帐号名称...][终端机编号...]

参数说明

  • -a  把从何处登入系统的主机名称或IP地址显示在最后一行。
  • -d  将IP地址转换成主机名称。
  • -f<记录文件>  指定记录文件。
  • -n<显示列数>或-<显示列数>  设置列出名单的显示列数。
  • -R  不显示登入系统的主机名称或IP地址。
  • -x  显示系统关机,重新开机,以及执行等级的改变等信息。

实例

显示登录失败的用户

# lastb 
root   tty7     :1        Thu May 13 11:26 - 11:26 (00:00)  

btmp begins Thu May 13 11:26:39 2014

点击查看所有 Linux 教程 文章: https://www.codercto.com/courses/l/14.html

查看所有标签

Introduction to the Design and Analysis of Algorithms

Introduction to the Design and Analysis of Algorithms

Anany Levitin / Addison Wesley / 2006-2-24 / USD 122.00

Based on a Based on a new classification of algorithm design techniques and a clear delineation of analysis methods, "Introduction to the Design and Analysis of Algorithms" presents the subject in a c......一起来看看 《Introduction to the Design and Analysis of Algorithms》 这本书的介绍吧!

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具