馬哥教育網絡班22期第五周課程練習1

1、cat /etc/passwd  | egrep "^root|^fedora|^user1"| cut -d":" -f1,7 

2、egrep -o  "[^[:space:]]+\(\)" /etc/rc.d/init.d/functions  

3、echo "/etc/rc.d/init.d/functions" | egrep  -o '[^/]+/?$' | egrep -o '[^/]+'

4、echo /etc/rc.d/ | egrep  -o '[^/]+/?$' | egrep -o '[^/]+'

5、ifconfig | egrep -o "[1-9][0-9]?|1[0-9]{2}|2[0-4][0-9]|25[0-5]"

ifconfig | egrep -o "(\<([0,1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\>\.){3}\<([0,1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\>"

6、egrep "[[:alnum:]]+_?[[:alnum:]]+@[[:alnum:]]+\.[[:alpha:]]+\.?[[:alpha:]]+?"

7、find /var -user root -a -group mail -exec ls -ld {} \; 

8、find / -nogroup  -o -nouser 

find / \( -nouser -o -nogroup \) -atime -3

9、find /etc -type f -perm -222

10、find /etc -size +1M -type f 

11、find /etc/init.d/ -perm -113

12、find /usr -not \( -user root -o -user bin -o -user hadoop \) -type f 

13、find /etc -not -perm /222 

14、find /etc/ -mtime -7 -not \( -user root -o -user hadoop \) -type f 

原創文章,作者:未聞花名,如若轉載,請注明出處:http://www.www58058.com/45676

(0)
未聞花名未聞花名
上一篇 2016-09-15 22:20
下一篇 2016-09-15 22:21

相關推薦

  • nginx配置(二)

    ngx_http_gzip_module: The ngx_http_gzip_module module is a filter that compresses responses using the “gzip” method. This often helps to reduce the size of transmitted data by half…

    Linux干貨 2017-05-08
  • 從案例出發——命令總結之find篇

    在這篇文章中你將看到以下內容:1、find命令的格式、語法、及實際應用 2、3個時間戳的意義  3、各種文件類型的解釋  4、軟硬鏈接的區別 5、exec和xargs的區別 6、幾個邏輯判斷符的意義  7、通配符的意義  8、find 命令下時間查找的特殊定義 首先,來看看以下題目:   &nbsp…

    Linux干貨 2016-03-25
  • 網絡班N22期第五周博客作業

    1、顯示當前系統上root、fedora或user1用戶的默認shell; [root@bogon ~]# cat /etc/passwd | grep -E "^(root|fedora|user1)\>" | cut -d:&nb…

    Linux干貨 2016-09-15
  • Linux系統程序包的管理-Yum及編譯安裝

          Yum 是通過分析RPM的標頭數據后,根據各軟件的依賴關系制作出有依賴關系時的的解決方案,然后可以自動處理軟件的依賴性問題,以解決軟件安裝或移除與升級的問題。       由于發行版必須要先釋放軟件,然后將軟件放置于yum服務器上面,以提供用戶端用來安裝與升…

    2017-05-02
  • Chrony

    RHEL7.4 192.168.100.1 作為時間服務器,其它主機到這臺來同步時間。 時間服務器安裝及配置:#yum install chrony –RHEL7默認已安裝chrony,而沒有安裝ntpd. #systemctl status chronyd –查看chronyd服務狀態#systemctl enable chrony…

    2018-01-06
  • 第二次作業

    一、只顯示某目錄下隱藏文件    答案1:#ls -d /tmp/*/    但是此答案是我在同學知道下完成,但是原理沒明白 如果單獨執行        #ls -d  &nbsp…

    Linux干貨 2016-08-03

評論列表(1條)

  • 馬哥教育
    馬哥教育 2016-09-19 18:23

    下次最好能把題目也寫上

欧美性久久久久