码迷,mamicode.com
首页 >  
搜索关键字:done    ( 2584个结果
Linux-0.11源代码阅读二 实模式到保护模式
bootsect部分已经执行完成,程序也跳转到setup部分: start: ! ok, the read went well so we get current cursor position and save it for ! posterity. mov ax,#INITSEG ! this is done in bootsect already, but... mov...
分类:系统相关   时间:2014-07-03 18:38:19    阅读次数:329
fast_ping
快速的ping网络中存活的主机,该脚本有并行执行的特点,能够在后台快速完成网络主机的检查。#!/bin/bash # # foripin192.168.1.{1..255}; do ( ping$ip-c2&>/dev/null; if[$?-eq0]; then echo$ipisalived fi )& done wait如果要出事255个地址,ping每一个IP的主机都..
分类:其他好文   时间:2014-07-02 15:59:11    阅读次数:286
几个 bash shell的例子
Ø  读取文件的时间 #!/bin/bash for file in `ls /root` do     stat $file>1.txt sed -n "7p" 1.txt>2.txt usetime= awk -F ":" '{print $2}' 2.txt echo "time="$file $usetime done       Ø  读取文件的每行while...
分类:其他好文   时间:2014-07-01 06:49:51    阅读次数:204
Shell脚本批量创建用户并随机生成密码
要求:批量创建10个系统账号oldboy01-oldboy10,并设置生成密码(密码不同).实现脚本:#!/bin/bash #Question3 foriin$(seq-w10) do useradd-s/bin/basholdboy$i echo"password$i"|md5sum|tee-apasswd.txt|passwd--stdinoldboy$i done脚本执行效果:[root@localhostq4]#shq4.sh Cha..
分类:其他好文   时间:2014-06-28 06:21:21    阅读次数:340
遍历目录中所有文件并统计信息
遍历目录中所有文件,并且统计文件类型。#!/bin/bash #filename:filestat.sh #set-x if[$#-ne1]; then echo$0basepath; echo fi path=$1 declare-Astatarray; whilereadline; do ftype=`file-b"$line"` letstatarray["$ftype"]++; done<<(find$path-typef-print) ech..
分类:其他好文   时间:2014-06-28 00:16:08    阅读次数:224
Linux下实现秒级定时任务的两种方案
Linux下实现秒级定时任务的两种方案(Crontab 每秒运行):第一种方案,当然是写一个后台运行的脚本一直循环,然后每次循环sleep一段时间。while true ;docommandsleep XX //间隔秒数done第二种方案,使用crontab。我们都知道crontab的粒度最小是到分...
分类:系统相关   时间:2014-06-27 16:27:29    阅读次数:339
Bug的类型
美国计算机科学家、图灵奖获得者詹姆斯·尼古拉·格雷(Jim Gray),在他的著名的论文“Why do computers stop and what can be done about it?”中首次提出了程序bug的类型,比如玻尔bug(Bohrbug)、 海森堡bug(Bohrbug)等用著名...
分类:其他好文   时间:2014-06-25 14:55:40    阅读次数:263
CentOS 6.5初始化优化脚本
#!/bin/bash echo"这个是系统初始化脚本,请慎重运行!" input_fun() { OUTPUT_VAR=$1 INPUT_VAR="" while[-z$INPUT_VAR];do read-p"$OUTPUT_VAR"INPUT_VAR done echo$INPUT_VAR } input_again() { MYHOSTNAME=$(input_fun"pleaseinputthehostname:") DOMAINNAME=$(input_fun"p..
分类:其他好文   时间:2014-06-25 06:16:37    阅读次数:345
GTD之图表
先挂个网站,褪墨·时间管理。还有一个温馨小站,風乃の部屋。学习啊。上图:之一播放幻灯片全部下载【之一】之Actions:【之一】之Done:【之一】之Week plan:【之一】之Month Plan:
分类:其他好文   时间:2014-06-24 11:33:58    阅读次数:238
How to use CCache to speed up cocos2d-x android compilation
CCache is a compiler cache for C/C++. It speeds up recompilation by caching the result of previous compilations and detecting when the same compilation is being done again. We can use this tool to s...
分类:移动开发   时间:2014-06-21 21:13:40    阅读次数:318
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!