2017年10月5日

linux crontab 隔秒执行

摘要: step=3 #间隔的秒数,不能大于60 for (( i = 0; i < 60; i=(i+step) )); do $(curl http://xx.xxx) sleep $step done 阅读全文

posted @ 2017-10-05 14:09 yuBestman 阅读(131) 评论(0) 推荐(0) 编辑

2016年8月9日

转 jquery实现循环中暂停

摘要: 这次需要用JS在一个for循环中暂停然后执行其他的事情,完成之后回来接着执行。 坑爹的要求么。但也要做啊。 首先想到的是setTimeout();不行。。。。然后各种判断,,,,各种参数还是不行,最后偶然的情况下发现setInterval();...... 其实就是改造for循环。。。。。。。 ht 阅读全文

posted @ 2016-08-09 17:07 yuBestman 阅读(367) 评论(0) 推荐(0) 编辑

2016年7月20日

php 字符串操作

摘要: str_replace(find,replace,string,count) 参数描述 find 必需。规定要查找的值。 replace 必需。规定替换 find 中的值的值。 string 必需。规定被搜索的字符串。 count 可选。对替换数进行计数的变量。 阅读全文

posted @ 2016-07-20 14:01 yuBestman 阅读(88) 评论(0) 推荐(0) 编辑

2016年7月1日

yii

摘要: 保存验证 echo CActiveForm::validate($model); 阅读全文

posted @ 2016-07-01 13:49 yuBestman 阅读(145) 评论(0) 推荐(0) 编辑

2015年3月20日

shell脚本监控服务器状态

摘要: 一、mutt的安装 1 yum -y install postfix2 #需要安装sendmail并开启防火墙的25端口,如果你需要收邮件110端口也要开3 yum -y install mutt 二、配置信息 ... 阅读全文

posted @ 2015-03-20 00:34 yuBestman 阅读(4976) 评论(0) 推荐(0) 编辑

2015年2月26日

inotify+rsync实现linux文件批量更新

摘要: ---恢复内容开始---公司网站一台服务器顶不住了,就打算用负载均衡,现在是3台机器一起运行网站,之前做的批量更新一直没写日志,现在补上,也是借鉴了不少博客这里不想编译安装就直接yum了yum install rsync//建立配置文件#touch /etc/rsyncd.conf//建立帐号配置文... 阅读全文

posted @ 2015-02-26 15:46 yuBestman 阅读(494) 评论(1) 推荐(0) 编辑

2015年1月30日

linux rar安装

摘要: 描述:Linux默认自带ZIP压缩,最大支持4GB压缩,RAR的压缩比大于4GB.流程:下载 》安装 》 使用-------------------------------------------------- 下载#wget http://www.rarsoft.com/rar/rarlinux-... 阅读全文

posted @ 2015-01-30 10:30 yuBestman 阅读(190) 评论(0) 推荐(0) 编辑

2015年1月22日

查询所有php文件中含有相应语句

摘要: find /home/wwwroot/ -name "*.php" | xargs grep 'file_get_contents' 阅读全文

posted @ 2015-01-22 15:34 yuBestman 阅读(171) 评论(0) 推荐(0) 编辑

2014年12月6日

linux自动删除规定天数前的文件

摘要: 公司在线上有一个监控系统,每天都会制造大量文件,然后就需要删除规定天数以前的文件,用来保证硬盘不会满造成服务中断。语句也很简单,#delete 15 days ago picture filesfind /home/monitoring/ -mtime +15 -exec rm -rf {} \;-... 阅读全文

posted @ 2014-12-06 15:05 yuBestman 阅读(199) 评论(0) 推荐(0) 编辑

2014年11月19日

linux sshd 开机自启动

摘要: Redflag linux安装之后,要想通过ssh远程访问,需要手动执行 service sshd start,这样sshd服务才开启。通过chkconfig可以将sshd加入到系统服务中。 [root@localhost ~]# chkconfig sshd on 可以再查看sshd的运行级别状态... 阅读全文

posted @ 2014-11-19 11:04 yuBestman 阅读(4228) 评论(0) 推荐(0) 编辑

导航