發個剛工作時的筆記

整理硬盤,角落裏發現這個小txt文件,挺有意思的,當時被派到一個城商行裏跟着學IT運維,結果後來就走上了這條路。


Job


Oct. 13, 2010

1. WAS installation.  

WAS: Webshere Application Server. Verion: 6.1


1) unzip tar.gz

2) ./install

3) GUI install

4) Installation Verification


2. Configure the Application Server

1) Create profile(CLI)

2) Add Node


3) Web Console, Web UI, Create the Application Server under the Node created above



Oct. 20, 2010

1. Expect:

set timeout -1  關閉任何超時設置

send_tty "some word to be sent to tty"

send_user "some word to be sent to user"



Oct. 21, 2010

1. tee

   who | tee savewho | wc-l

   中間保存到savewho文件,相當於插入了一個動作


2. wc -l file  統計文件的行數


3. history命令

   histroy 10 列出最近的10條命令

   r 9重複執行第9條命令


4. find命令

   find . -name "name

   find . -perm 755  找出所有權限爲755的文件

   find . -user leontan

   find . -nouser   查找用戶已經被刪除了的文件

   find . -group starf

   find . -nogroup

   find . -size +1000000c  大於1000,000byte的文件

   find . -size 100c  等於100byte的文件

   find . -size +100  大於100 blocks的文件,1 blocks=512 byte

   find . -mtime -5   修改時間在5天內的文件

   find . -mtime +3   修改時間在3天前的文件

   find . -newer newfile ! -newer project  比newfile新但比project舊的文件


   find . -exec ls -l {} \;  對找出來的文件執行ls -l操作

   find /logs -type f -mtime +5 -exec rm {} \; 刪除5天前的文件

   find /logs -type f -mtime +5 -ok rm {} \;執行命令前確認


5. touch -t 10092315 abc.txt 新建一個空白文件,時間是10月9日23:15


6. grep命令

   -i ignorecase

   -v 邏輯否  

       grep -v '^48' data 不以48開頭的行

   -w 只包含(精確匹配)

       grep -w 48 data   不包括 484,489,548之類


7. AIX看OS Level

   oslevel -s


8. xargs

   從標準輸入中讀入信息爲後續命令組成參數列表

   ls | xargs -t -I {} mv {} {}.old

   -I 表示替換,{}指代


9. cut命令,用於從輸入信息中截取

   cut -c1-7 pers 從文件中截取第1個到第7個字符,c表示截取

   cut -d: -f2 pers

       -d 指定分割域的符號,默認是空格, -f指定哪個域,

   cut -d: -f1,3 pers


10. Shell預置變量

   $$  正在運行的進程PID

   $0: 正在運行的shell腳本

   $#: 傳遞給shell腳本的位置參數個數

   $*: 以一個單字符串顯示所有向腳本傳遞的參數

   $?: 上一次執行命令的返回碼

   $!: 最後一個後臺進程的PID



11. expr 運算

   expr substr "This is a test" 3 7

       substr從第3個字符開始,取長度7個字節


12. if then else fi


   if expression

   then

       commands to be executed

   fi


   if expression

   then

       commands to be executed

   else

       commands to be executed

   fi


13. until 語句


   until expression

   do

       commands

   done


14. while 語句


   while expression

   do

       commands

   done


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章