码迷,mamicode.com
首页 > 系统相关 > 详细

Linux 08

时间:2014-08-07 18:49:10      阅读:314      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   2014   art   ar   linux   line   

1

bubuko.com,布布扣

{printf $6" "$7" \t";if (substr($1,1,1)=="d") {printf "<dir>\t"} else {printf "\t"$5}; print "\t"$8}

ls -l --time-style=+‘%F %R‘  /etc |awk -f /home/awk/windir.awk

效果:

bubuko.com,布布扣

 

 

2

 

bubuko.com,布布扣

uptime | awk ‘{if($8 > 20 || $9 > 20|| $10 > 20) print "service httpd restart";else print "echo OK"}‘ > restart.sh

 

3.

find / -name "a*" -type f -exec ls -l {} \;|awk ‘BEGIN{sum==0;i==0} {sum=sum+$5; i++;} END{ print sum/i;}‘

bubuko.com,布布扣

Linux 08,布布扣,bubuko.com

Linux 08

标签:style   blog   http   2014   art   ar   linux   line   

原文地址:http://www.cnblogs.com/oraclesea/p/3897699.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!