09 2021 档案

摘要:统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来 [user1@CentOS test]$ grep -v '\(.*/sbin/nologin$\)$' /etc/passwd|cut -d: -f1 root sync shutdow 阅读全文
posted @ 2021-09-05 11:06 Y&ou 阅读(36) 评论(0) 推荐(0)
摘要:1、显示/etc目录下,以非字母开头,后面跟了一个字母以及其它任意长度任意字符的文件或目录 ^:非,排除 []:匹配[]出现的一个字符 [:alpha:]:任意的大小写字母 *:匹配零个或多个字符,不匹配隐藏文件 [root@sh-720 ~]# ls /etc/[^[:alpha:]]* ls: 阅读全文
posted @ 2021-09-04 21:29 Y&ou 阅读(40) 评论(0) 推荐(0)