摘要: 下载地址http://www.imagemagick.org/download/ImageMagick.tar.gz wget http://www.imagemagick.org/download/ImageMagick.tar.gz tar zxvf ImageMagick.tar.gz cd ImageMagick-6.8.5-10/ ./configure make sudo make install sudo ldconfig /usr/local/lib /usr/local/bin/convert logo: logo.gif make check用法http://blog.c. 阅读全文
posted @ 2013-06-07 21:28 sunsweet 阅读(157) 评论(0) 推荐(0) 编辑
摘要: $tar zxvf bind-9.9.3-P1.tar.gz$yum install -y make gcc gcc-c++ open-ssl openssl-devel$cd bind-9.9.3-P1$sudo ./configure -prefix=/usr/local/named --mandir=/usr/local/share/man -enable-threads --disable-openssl-version-check$sudo make && sudo make installsudo /usr/local/named/sbin/rndc-confgen 阅读全文
posted @ 2013-06-07 15:40 sunsweet 阅读(231) 评论(0) 推荐(0) 编辑
摘要: awk '{buffer[$(NF-1)]++} END {for(x in buffer) print buffer[x]"\t"x;}' access.log | awk '/.*HIT.*/ {hitsum+=$1;print $0}/.*MISS.*/ {missum+=$1;print $0} END {print hitsum/(hitsum+missum)*100"%"}' 阅读全文
posted @ 2013-06-05 01:19 sunsweet 阅读(160) 评论(0) 推荐(0) 编辑
摘要: logformat log_format %>a %ui %un %ts "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh %tr #日志格式access_log /usr/local/squid2.7/var/logs/access.log log_formatField name syntax keys:{} modifier or argument. Also used to specify header names& 阅读全文
posted @ 2013-06-05 01:15 sunsweet 阅读(1456) 评论(0) 推荐(0) 编辑
摘要: 客户用到的节点ip放在文件ip.txt里,例如192.168.1.1192.168.1.2192.168.1.3192.168.1.4192.168.1.5192.168.1.6192.168.1.7192.168.1.8192.168.1.9192.168.1.10check_proxy.sh 1 if [ $# -ne 1 ];then 2 echo usage: ./check_proxy.sh site 3 echo example: ./check_proxy.sh www.test.com 4 exit 5 fi 6 for ip in $(cat ip.t... 阅读全文
posted @ 2013-06-04 18:23 sunsweet 阅读(135) 评论(0) 推荐(0) 编辑
摘要: dl 删除当前字符(与x命令功能相同)d0 删除到某一行的开始位置d^ 删除到某一行的第一个字符位置(不包括空格或TAB字符)dw 删除到某个单词的结尾位置d3w 删除到第三个单词的结尾位置db 删除到某个单词的开始位置dW 删除到某个以空格作为分隔符的单词的结尾位置dB 删除到某个以空格作为分隔符的单词的开始位置d7B 删除到前面7个以空格作为分隔符的单词的开始位置d) 删除到某个语句的结尾位置d4) 删除到第四个语句的结尾位置d( 删除到某个语句的开始位置d) 删除到某个段落的结尾位置d{ 删除到某个段落的开始位置d7{ 删除到当前段落起始位置之前的第7个段落位置dd 删除当前行d/tex 阅读全文
posted @ 2013-06-04 13:33 sunsweet 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 24 void25 get_pass ( <+argument list+> )26 { 27 return <+return value+>;28 } :25s/<.*>/char *str,int length,int ret_length/ 给函数添加参数列表24 void25 get_pass ( char *str,int length,int ret_length )26 { 27 return <+return value+>;28 } vi/vim 中可以使用 :s 命令来替换字符串。以前只会使用一种格式来全文替换,今天发现... 阅读全文
posted @ 2013-06-04 12:57 sunsweet 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 登录pop3检查邮件数量#!/bin/bashmailserver=pop3.test.comuser='username'password='pass'exec 9<>/dev/tcp/$mailserver/110read -r temp <&9 echo "$temp"echo "user $user" >&9read -r temp <&9 echo "$temp"echo "pass $password" >&am 阅读全文
posted @ 2013-06-01 16:10 sunsweet 阅读(454) 评论(0) 推荐(0) 编辑
摘要: During the process of learning websockets, wanted to try out the handshake mechanism using a simple server cooked using netcat/bash script. The script just reads the request message, parses the key, forms the SHA1/base64 response key and sends the response.Tested it with chromium. Attached are the c 阅读全文
posted @ 2013-06-01 11:26 sunsweet 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 功能说明:功能强大的网络工具语 法:nc[-hlnruz][-g<网关...>][-G<指向器数目>][-i<延迟秒数>][-o<输出文件>][-p<通信端口>][-s<来源位址>][-v...][-w<超时秒数>][主机名称][通信端口...]参 数:-g<网关>设置路由器跃程通信网关,最丢哦可设置8个。-G<指向器数目>设置来源路由指向器,其数值为4的倍数。-h在线帮助。-i<延迟秒数>设置时间间隔,以便传送信息及扫描通信端口。-l使用监听模式,管控传入的资料。-n直接使 阅读全文
posted @ 2013-05-31 17:32 sunsweet 阅读(385) 评论(0) 推荐(0) 编辑