整理硬盘,角落里发现这个小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