linux命令学习(59 60 61)-lastb groups newgrp
原创
©著作权归作者所有:来自51CTO博客作者chinalscxc的原创作品,请联系作者获取转载授权,否则将追究法律责任
【命令名称】 lastb
【使用权限】 root
【命令语法】 lastb
【功能说明】 显示过去时间里root登录时间,来源IP,日期等等
【常用参数】 参数很多,但是不常用,忽略,指定/var/log/btmp
【命令实例】
1.查看过去时间里root登录的时间段
[cxc@cxcserver ~]$ sudo lastb
root tty1 Mon Jan 7 12:58 - 12:58 (00:00)
root ssh:notty 192.168.20.247 Tue Dec 25 15:54 - 15:54 (00:00)
root ssh:notty 192.168.20.247 Tue Dec 25 15:51 - 15:51 (00:00)
root ssh:notty 192.168.20.247 Tue Dec 25 15:50 - 15:50 (00:00)
root ssh:notty 192.168.20.247 Tue Dec 25 15:47 - 15:47 (00:00)
root ssh:notty 192.168.20.247 Tue Dec 25 15:36 - 15:36 (00:00)
root tty1 Sun Dec 23 20:09 - 20:09 (00:00)
root tty1 Sun Dec 23 20:04 - 20:04 (00:00)
root tty1 Sun Dec 23 19:53 - 19:53 (00:00)
root tty1 Thu Dec 20 09:45 - 09:45 (00:00)
root tty1 Fri Dec 14 18:10 - 18:10 (00:00)
root tty1 Fri Dec 14 18:10 - 18:10 (00:00)
btmp begins Fri Dec 14 18:10:15 2012
[cxc@cxcserver ~]$
【命令名称】 groups
【使用权限】 所有人
【命令语法】 groups
【功能说明】 查看用户所属的哪些组
【常用参数】 暂无
【命令实例】
1. 查看test所组哪些组
[cxc@cxcserver ~]$ groups test
test : test cxc
[cxc@cxcserver ~]$
【命令名称】 newgrp
【使用权限】 所有人
【命令语法】 newgrp
【功能说明】 修改当前用户初始群组
【常用参数】 暂无
【命令实例】
1 修改test初始群组
[test@cxcserver ~]$ groups
test cxc
[test@cxcserver ~]$ newgrp cxc
[test@cxcserver ~]$ groups
cxc test
[test@cxcserver ~]$
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Linux shell编程学习笔记60:touch命令
在csdn技能树Linux入门的练习题中,touch是最常见的一条命令。这次我们就来研究它的用法。
linux 学习笔记 shell编程 脚本编程 touch命令 -
Linux 第60,61天 ansible的playbook
ansible playbook,yaml,jinja2简单的使用
ansible playbook -
newgrp
newgrp名称: newgrp 登陆到另一个群组上 sg 以不同的组执行一个命令总揽: newgrp [-] [Group] sg [-] Group [[-c] Command]
休闲 linux newgrp linux sg newgrp sg -
Linux命令(59)之screen
linux命令之screen介绍
linux 运维 服务器 screen linux命令