馬哥教育網絡班20期第3周課程練習

答:

1、

[root@totooco ~]# who | cut -c1-9 | sort -u

2、

[totooco@totooco ~]$ who | cut -c1-9 | head -1

3、

[root@totooco ~]# cat /etc/passwd | cut -d: -f7 | grep -v /sbin/nologin | sort -n | uniq -c | head -1

4、

[root@totooco ~]# sort -t: -k3 -nr /etc/passwd | tail -10 | tr 'a-z' 'A-Z' &> /tmp/maxusers.txt

5、

[root@totooco ~]# ifconfig eth0 | grep inet

6、

[root@totooco ~]# ls /etc/*.conf | tr 'a-z' 'A-Z' &> /tmp/etc.test

7、

[root@totooco ~]# ls /var/ | wc -l

8、

[root@totooco ~]# cat /etc/group | sort -n -t: -k3 | head -10 | cut -d: -f1

9、

[root@totooco tmp]# cat /etc/fstab /etc/issue > /tmp/etc.test2

10、

[root@totooco tmp]# groupadd  -g 2016 distro

[root@totooco tmp]# useradd -u 1005 -g 2016 mandriva

[root@totooco tmp]# useradd -u 1005 -g 2016 mandriva

[root@totooco tmp]# echo 'mageedu' | passwd –stdin mageia

[root@totooco tmp]# userdel mandriva

[root@totooco tmp]# useradd -u 2002 -g distro -G peguin slackware

[root@totooco tmp]# usermod -s /bin/tcsh slackware

[root@totooco tmp]# usermod -G admins slackware

[root@totooco tmp]# passwd slackware

[root@totooco tmp]# passwd -n3 -x180 -w3 slackware

[root@totooco tmp]# useradd -u 3003 -g clouds -G peguin,nova openstack

?

[root@totooco tmp]# useradd -r -s /sbin/nologin mysql

?

[root@totooco tmp]# echo 'mageedu' | passwd –stdin openstack

原創文章,作者:Net20_totooco,如若轉載,請注明出處:http://www.www58058.com/18594

(0)
Net20_totoocoNet20_totooco
上一篇 2016-06-23 10:56
下一篇 2016-06-23 10:58

相關推薦

  • Linux獲取幫助的途徑、history命令及文件系統結構

        在學習Linux的過程中,往往會遇到一些難以理解的問,這時我們就需要尋求幫助,下面是獲取幫助的幾個途徑。 一、man(manual)手冊(命令) 1、man手冊介紹 (1)man手冊是系統自帶的聯機幫助手冊,善于利用man命令,可以幫我們解決遇到的大部分問題。 (2)man手冊分為九個章節,每個章節是獨立的。 章節1:表…

    Linux干貨 2016-07-29
  • 文件查找

    文件查找: locate查找:     locate:     依賴于事先構建好的索引庫,操作系統剛完成沒有       系統自動實現(周期性任務);      &nbs…

    Linux干貨 2016-08-15
  • BT雷人的程序語言

    這個世界從來都不會缺少另類的東西,人類自然世界如此,計算機世界也一樣。編程語言方面,看過本站《6個變態的C語言Hello World程序》的朋友們一定對BT和另類不會陌生,但那都是些小兒科,真正的BT和另類要是從語言級上來完成。讓我們來看看其中一個比較另類的語言BrainFuck??吹竭@個程序語言的名字,請不要以為這是一個搞笑的語言,這是一個“嚴肅事情”,請…

    Linux干貨 2015-04-03
  • 輸出重定向 輸入重定向 管道簡單介紹 -20160729

    輸出重定向 輸入重定向 管道簡單介紹 標準輸入和輸出 我們先來了解下輸入和輸出的概念: 在計算機中我們了解到計算機的組成部分:其中有輸入 輸出設備。       輸出重定向 對于程序來說: 程序 :指令 + 數據 對于數據來說,數據可以由我們通過鍵盤輸入,或者程序直接使用存儲設備上的數據,我們稱為讀入 數據,程序處理數據后需要返…

    Linux干貨 2016-08-04
  • Linux破解root口令

    Centos5、6版本破解口令方法 1 啟動系統 2 在操作系統選擇菜單界面選中要啟動的內核 — 按a鍵 3 在行尾輸入 1(或s或S或single)— 按回車鍵 4 使用passwd命令修改口令即可   Centos7版本破解口令方法 方法1 1 啟動系統 2 在操作系統選擇菜單界面選中要啟動的內核 — 按e鍵…

    Linux干貨 2018-01-08
  • httpd服務歸納:httpd基本配置(https原理以及配置 )

    一 https介紹以及實現機制   1. https協議:      在傳統的http協議中,文檔是明文傳送的,網頁涉及敏感信息是,將變得很不安全。為了保證敏感信息的安全,httpd結合加密庫openssl或openssh 產生了https 協議。這就好比兩個黑社會團伙交易,都怕出事被抓,…

    Linux干貨 2015-05-23

評論列表(1條)

  • 馬哥教育
    馬哥教育 2016-06-23 13:54

    不用寫答,不過寫的很棒,可以在多關注一下排版的技巧,取ip地址好像不對吧

欧美性久久久久