第六章 UNIX(AIX)SHELL编程实现系统检查脚本.pdfVIP

  • 19
  • 0
  • 约1.12万字
  • 约 5页
  • 2017-06-13 发布于湖北
  • 举报

第六章 UNIX(AIX)SHELL编程实现系统检查脚本.pdf

Blog: tomroom.cublog.cn UNIX(AIX) SHELL 编程实现系统检查脚本 进阶 实例 tomroom 环保男 UNIX(AIX) SHELL 编程实现系统检查脚本 进阶 实例 说明:Unix (aix )编程开头难,下面把常用系统检查命令脚本拆开逐个逐步解释,举一反 三 例子运行环境:IBM UNIX(AIX) 6.1 环境 ,2012-3-1 last update 1)wc 命令 (word count ) 可以统计file 或者 前面命令输出结果的行数或者字数 # df Filesystem 512-blocks Free %Used Iused %Iused Mounted on /dev/hd4 9636208 9% 13472 2% / /dev/hd2 7340032 1283056 83% 49960 26% /usr /dev/hd9var 4194304 2999928 29% 9555 3% /var /dev/hd3 19% 472 1% /tmp /dev/hd1 28% 77 1% /home /dev/hd11admin 524288 523520 1% 5 1% /admin /proc - - - - - /proc /dev/hd10opt 4328912 75% 71158 13% /opt /dev/livedump 524288 523552 1% 4 1% /var/adm/ras/livedump /dev/fslv00 1572864 497136 69% 97 1% /wujtest /dev/fslv01 524288 523480 1% 11 1% /test /dev/fslv02 4194304 4193008 1% 4 1% /nmon /dev/fslv03 209715200 196829032 7% 1601 1% /doc # df | wc -l 14 上面统计df 命令输出数量14 行 2 )sed 命令(stream edit )文件或者前面命令输出结果的字符串处理,用其中 1d 参 数可以去掉df 命令 运行结果的第一行表头。 sed 还可以字符替换并写入到另外一 个文件等操作,下面是man 附录信息 The sed command modifies lines from the specified File parameter according to an edit script and writes them to standard output. The sed command includes many features for selecting lines to be modified and making changes only to the selected lines. The sed command uses two work spaces for holding the line being modified: the pattern space, where the selected line is

文档评论(0)

1亿VIP精品文档

相关文档