第四周作業 wx5d189c6ae0c02的部落格

2022-09-23 04:54:11 字數 917 閱讀 4013

1、查詢/var目錄下不屬於root、 ip、gdm的所有檔案

find /var ( -not -user root -a -not -user lp -a -not -user gdm ) -ls

2、統計/etc/init.d/functions檔案中每個單詞的出現次數,並排序(用grep和sed兩種方法分別實現)

grep

cat /etc/init.d/functions | grep -e "\b[[:alpha:]]+\b" -o | grep -v -e "\b[[:alpha:]]\b" | uniq -c|wc -l

sedcat /etc/init.d/functions| sed 's/[^[:alpha:]]/:/g' |tr -s "\n" ":"|tr -s ":" "@"|sed 's/@/\n/g'|sort|uniq -c|sort -nr

3、利用sed取出ifconfig命令中本機的ipv4位址實現)

ifconfig | sed -n 's/.inet //;s/ net.//;2p'

4、 總結yum的配置和使用,包括yum倉庫的建立

yum 配置檔案在/etc/yum.repos.d/ 下 yum 常用命令yum install package_name 指定安裝yum remove package_name 指定解除安裝yum search name 查詢軟體包yum groups list 列出包組列表yum groups install name 安裝指定包組yum groups remove name 解除安裝指定包組

5、編寫系統初始化指令碼reset.sh,包括別名,提示符顏色, yum倉庫配置檔案,

6、安裝treefp:,ftp,telnet等包

tree

ftptelnet

7、在centos7.上編譯安裝apache2.4原始碼包,並啟動此服務

第四周C 作業

1.完成課本每乙個程式設計題。要求先畫出流程演算法圖或n s圖,然後程式設計實現,有可能的話使用兩種以上方法 課本76頁程式設計題 求自然對數e的近似值 include using namespace std int main cout e int main cout pai 4 paiint ma...

C 第四周作業

第一題 習題5 功能 求自然對數 e的近似值 include include using namespace std int main int i,j double e 1,s 1 for i 1 i 10 i for j 1,j i j s j e 1 s s 1 return 0 習題6 功能 ...

C 第四周作業

一 自然對數e includeusing namespace std int main cout 自然對數為 圓周率 include using namespace std int main cout 圓周率為 定義範圍 include includeusing namespace std int ...