測試題

1.將/etc/fstab中的空行刪除顯示到終端vim

sed '/^$/d' /etc/fstab

2.只打印/etc/fstab第2到第5行ide

sed -n '2,5p' /etc/fstab

3.將/etc/fstab中的「/」替換爲「?」:code

sed 's/\//?/g' /etc/fstab

4.解壓test.tar.gz到/tmp/test1目錄下,顯示解壓過程進程

tar -zxvf test.tar.gz -C /tmp/test1

5.解壓file1.bz2文件,寫出兩種方式

bzip2 -d file1.bz2
bunzip2 file1.bz2

6.將本地當前目錄下名爲file2的文件,複製到遠程主機192.168.1.20的/tmp/test目錄下,以root身份複製ip

scp ./file2 root@192.168.1.20:/tmp/test

7.查看httpd服務當前狀態信息it

service httpd status

8.顯示進程信息,包含與終端相關,無關,及用戶相關進程class

ps aux

9.當前運行某vim進程,pid爲11834,調整nice值爲5test

renice -n 5 -p 11834  

10.查看進程樹信息,用兩種方式

      pstree

      ps axjf
相關文章
相關標籤/搜索