????0. ????????
????linux ????????????
????1. ??? ???
????tar -zcvf a.tar.gz a   #??a?????a.tar.gz
????tar -zxvf a.tar.gz     #??a.tar.gz?????a
????2. vimС??
????2.1 vim?滻
????:m??ns/word_1/word_2/gc  #??word_1??word_2?滻??g????滻???е?? c????滻???????????
????2.2 vim?????????????????
????:m??ns/word_1/&/gn       #????m?е?n?????word_1??????? n???????????????滻
????:1??$s/word_1/&/gn       #?????????????word_1???????????????
????:%s/word_1/&/gn
????2.3 vim????????????
??????m??ng/word_1/d         #???m?е???n????????е?word_1
????3. ???????
????3.1 locate——????????????
????locate /bin/zip
????3.2 find——????????????????????????2???
????find /usr  -type f -name "*.png" -size +1M           #?????????Χ??/usr????????.png??β????С????1M(+1M??1M??-1M)
????find /usr  -type f -name "*.png" -size +1M  | wc -l  #????????????????
????find /usr  -type f -name "*.png" -size +1M  -delete  #?????????????
????3.3 ?????dirs?o????????“hello”??????????????????????
????find .|xargs grep -ri "IBM"      #xargs?????Unix????Unix??????????????????????????????б??????С???δ?????????????????????б??????????
????find .|xargs grep -ri "IBM" -l   #???????????
????4. ????
????cat file_name | sort -k2 -r            #??????У?????????????????-r???reverse?????С???
????cat file_name | sort -k1 -n            #??????????? -n?????????????????????????
????cat file_name | sort -k1 -nr | wc -l   #????????????????
????5. ??????
????5.1 df——??????????
????df     #?г??????????????????????????? δ????????У?Size  Used Avail Use% Mounted on
????df -h  #????????????? ????KMG????????
????5.2 du——?????С
????df               #?г??????£??????С???????????λ??k??
????df -h ?????      #???????????????????????С
????5.3 w——CPU?????????????????????е?????????????1min??5min??15min??load??????
????w
????6. awk????
????cat file_name | awk '{print $1}'                           #???????У?????????з??
????cat file_name | awk  -F ':'  '{print $1" "$3}'            #-F????и??????????3??
????cat file_name | awk -F ':' 'BEGIN {print "name??id"} {print $1"??"$3} END {print "end_name??end_id"}'  #BEGIN???????????END?????β???
????cat file_name | awk -F ':' '/keyWord/{print $1}'           # ???????к??й????keyWord???????
????cat file_name | awk -F ':' '{print "filename:" FILENAME "??linenumber:" NR "??columns:" NF}'          #???????FILENAME???????NR??????????NF????
????cat file_name | awk '{count++} END {print "Count:" count}' #???????????????