Linux基礎命令練習題答案7 10

2022-02-15 04:42:50 字數 1644 閱讀 1917

5.在linux中訪問qls的部落格**,訪問主頁就可以

curl 

6.在linux中訪問qls的部落格**,要求把主頁的內容儲存到qls.html檔案中。

curl  -os  qls.html      

11.把你的課堂筆記上傳到linux系統中

rz  課堂筆記.zip

12.把你的習題筆記上傳到linux系統中的/opt目錄下面

cd /opt  | rz 習題筆記.zip

13.如果我要把本地電腦中的目錄上傳到linux系統,請問怎麼上傳?

rz   目錄.zip

14.查詢ifconfig命令的絕對路徑在**?你能使用幾種方法實現?

which ifconfig

whereis  -b ifconfig

type -p  ifconfig

locate ifconfig

15.查詢netstat命令的絕對路徑在**?你能使用幾種方法實現?

which netstat

whereis -b netstat

type -p netstat

locate netstat

16.統計檔案/etc/hosts的行數?你能使用幾種方法實現?

cat -n /etc/hosts

17.改變bash的提示符實際上就是改變變數?

ps118.顯示/etc/passwd檔案的前5行內容。

head -5 /etc/passwd

19.顯示/etc/passwd檔案的最後5行內容。

tail -5 /etc/passwd

20.顯示/etc/services檔案的第11行到第20行的內容

head -20 /etc/services | tail -10

more -10 +11  /etc/services

21.檢視系統中的cd命令是不是內嵌命令

help

type cd

22.找出系統中檔名為oldboy.txt的所有檔案。

find / -type f -name 'oldboy.txt'

23.找出系統中名為oldboy的所有目錄。

find / -type d -name 'oldboy'

24.找出系統中檔名以oldboy開頭的所有檔案。

find / -type f -name 'oldboy*'

25.rm是個危險的命令,要求用命令rm刪除檔案時提示「rm command no bny」,怎麼實現?

alias rm="echo 'rm command no bny'"

26.設定rm命令存在別名之後,要刪除/oldboy這個目錄,怎麼實現?

\rm -rf /oldboy

27.實時檢視系統日誌/var/log/message的更新

tail -f /var/log/message

28.查詢出系統中為s型別的檔案

find / -type s

29.查詢出系統中為p型別的檔案

find / -type p

30.只顯示出/etc/passwd檔案的第五行

head -5 /etc/passwd | tail -1

more -1 +5  /etc/passwd

有問題請提出謝謝

Linux基礎命令練習題一(附答案)

1 請用命令查出ifconfig命令程式的絕對路徑 root localhost which ifconfig usr sbin ifconfig 2 請用命令展示以下命令哪些是內部命令,哪些是外部命令?cd pwd ls ifconfig du root localhost type cd cd ...

linux基礎練習題答案7 28

1.linux下常見的壓縮包型別有哪些 zip gz.tar.gz tar.bz2 bz2 2.將 etc hosts檔案用tar格式打包。tar czf hosts.tar.gz etc hosts 3.檢視打包之後的 etc hosts的檔案內容,在不解壓的情況下檢視。tar tf hosts....

Linux基礎練習題答案7 23

1.使用者基礎許可權為9位,每三位為一組,每組代表著誰的許可權?屬主 屬組 其他 u g o 4 2 1 2.許可權中的rwx 每個字元所代表什麼意思?對應的數字是什麼?r 唯讀 4 w 只寫 2 x 只執行 1 沒有許可權 0 3.rwxr xr x,寫出對應數字許可權 7554.rwxr r 寫...