Linux常用命令last怎么用
小编给大家分享一下Linux常用命令last怎么用,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
Linux常用命令ast 命令用于显示用户最近登录信息。
语法shell>>last[options]
参数说明:
-R 省略 hostname 的栏位
-num 展示前 num 个
username 展示 username 的登入讯息
tty 限制登入讯息包含终端机代号
实例shell>>last-R-2johnneypts/1MonAug1420:42stillloggedinjohnneypts/0MonAug1419:59stillloggedinwtmpbeginsTueAug109:01:102000###/var/log/wtmpshell>>last-2mineryminerypts/0140.119.217.115MonAug1418:37-18:40(00:03)minerypts/0140.119.217.115MonAug1417:22-17:24(00:02)wtmpbeginsTueAug109:01:102000
一般显示方法
#last
简略显示,并指定显示的个数
#last-n5-Rrootpts/4ThuMay1317:25stillloggedinrootpts/2ThuMay1317:23-17:25(00:02)rootpts/1ThuMay1316:46stillloggedinrootpts/7ThuMay1315:36stillloggedinrootpts/9ThuMay1315:35stillloggedinwtmpbeginsThuMay1318:55:402014
显示最后一列显示主机IP地址
#last-n5-a-irootpts/4ThuMay1317:25stillloggedin192.168.1.10rootpts/2ThuMay1317:23-17:25(00:02)192.168.1.10rootpts/1ThuMay1316:46stillloggedin192.168.1.10rootpts/7ThuMay1315:36stillloggedin192.168.1.10rootpts/9ThuMay1315:35stillloggedin192.168.1.10wtmpbeginsThuMay1318:55:402014
以上是“Linux常用命令last怎么用”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。