Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2916775
  • 博文数量: 454
  • 博客积分: 4860
  • 博客等级: 上校
  • 技术积分: 6375
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-13 10:08
个人简介

10年工作经验,专研网站运维。

文章分类

全部博文(454)

文章存档

2017年(11)

2016年(13)

2015年(47)

2014年(36)

2013年(147)

2012年(64)

2011年(136)

发布时间:2013-05-31 10:39:14

#####################  CPU  ########################!/bin/bash### Execute it at 0:1 everynight.### Type "sh /tmp/script-shell/cpu.sh" in /etc/crontabvalue=`top -n 1 | awk 'NR==3 { print $2 }'`date=`date +%Y%m%d`if [ ! -d /tmp/script-shell ];then mkdir -p /tmp/script-shell else sleep 1s fie.........【阅读全文】

阅读(2356) | 评论(0) | 转发(0)

发布时间:2013-05-09 12:56:13

#!/bin/bashecho "Enter username:"read auseradd $aecho "Enter password:"read becho "$b" | passwd --stdin $aecho "For 10s, The $a user will create completly"......【阅读全文】

阅读(1948) | 评论(0) | 转发(0)

发布时间:2013-04-25 10:29:19

vim rm.sh#!/bin/bash# Delete file of 30 days agofind . -atime +30 -exec rm -rf {} \;保存退出。[root@dlhs1201 log]# crontab -e23 11 * * 0 sh /tmp/rm.sh保存退出......【阅读全文】

阅读(2433) | 评论(0) | 转发(0)

发布时间:2013-04-24 08:44:36

[root@dlhs1201 /]# ps -ef | sed -n '3p'......【阅读全文】

阅读(1816) | 评论(0) | 转发(0)

发布时间:2013-04-20 11:21:07

[root@localhost shelll-script]# cat stophttp.sh #!/bin/bash#定义变量PSline=12psline=12firsttime=1lasttime=5#停止服务/etc/init.d/httpd stopsleep 1#每个2秒查看服务是否停止while [ $PSline -ge 2 ]doecho "It's stopping"sleep 1sPSline=`ps -ef | grep httpd | wc -l | awk '{print $1}'`#.........【阅读全文】

阅读(2152) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册