码迷,mamicode.com
首页 >  
搜索关键字:shell memcache printf    ( 45225个结果)
shell 监控判断进程是否存在,如果不存在就重新启动脚本。
#!/bin/bash while [ 1 ] do SendMail_is_exstit=$(ps -ef | grep "feed SendMail" | grep -v grep | wc -l) if [ ${SendMail_is_exstit} == 0 ] then cd /var/www/sdkfeed/ ./app/Console/cake SendMail fi slee...
分类:系统相关   时间:2014-11-26 19:23:57    阅读次数:229
Linux程序包管理之yum
update,YellowdogUpdateModifier,YUMyum是什么?yum是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无需繁琐的一次次下载、安装。yum是基于yum数..
分类:系统相关   时间:2014-11-26 19:20:57    阅读次数:227
打印1到最大的n位数
题目:输入数字n,按顺序打印出从1到最大的n位十进制数。比如输入3,则打印输出1,2,3一直到最大的三位数999.直接方法:voidPrint1ToMaxOfNDigits_1(intn) { intnumber=1; inti=0; while(i++<n) number*=10; for(i=1;i<number;i++) printf("%d\t",i); }这样做其实就陷入..
分类:其他好文   时间:2014-11-26 19:19:42    阅读次数:187
VBS定时关闭的弹窗
'类似msgbox'定时停留弹出框函数Sub Print(text,timeout,title) Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Popup text,timeout,title Set W...
分类:其他好文   时间:2014-11-26 18:21:03    阅读次数:658
Django修改用户名密码的方法
1.python manage.py shell2.from django.contrib.auth.models import User3.user=User.objects.get(username='XXX')4.user.set_password('new_password')5.user....
分类:其他好文   时间:2014-11-26 18:17:17    阅读次数:189
Shell | grep with n following lines
grep -A 10 'foo' sample.txt? dex-method-counts git:(master) ./dex-method-counts ~/Downloads/n.apk | grep -A 10 'hui' hui: 304 ...
分类:Windows程序   时间:2014-11-26 18:01:41    阅读次数:177
JAVA与groovy脚本的结合使用
java执行groovy shell脚本  org.codehaus.groovy  groovy-all  2.4.0-beta-1 添加groovy jar包支持 ==================================================== package groovy; import groovy.la...
分类:编程语言   时间:2014-11-26 16:40:15    阅读次数:209
win7,xp通用的打开文件浏览对话框的方法
第一种:Function?BrowseForFile() Dim?shell?:?Set?shell?=?CreateObject("WScript.Shell") Dim?fso?:?Set?fso?=?CreateObject("Scripting.FileSystemObjec...
分类:Windows程序   时间:2014-11-26 16:25:20    阅读次数:312
常用shell 命令整理
1.查看内存从大到小排列ps -e -o "%C : %p : %z : %a"|sort -k5 -nr分析:-e 显示进程-o 按用户自定义格式显示%C cpu%p 父进程id%z 虚拟内存%asort 排序命令-k5 按第5列排序-nr 比较数字 从大大小-n 比较数字 从小到大实例 1.1:...
分类:系统相关   时间:2014-11-26 16:18:18    阅读次数:268
gcc 编译的4个过程简单识记
直入正题,测试编译代码如下: 1 lude 2 3 int main() 4 { 5 int x=2,y,z; 6 x*=(y=z=5); 7 printf("%d\n",x); 8 z=3; 9 x==(y=z);10 printf("%d\n",x);11 x=(y==z);12 print.....
分类:其他好文   时间:2014-11-26 16:15:10    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!