- 浏览: 27129 次
- 性别:
- 来自: 北京
最新评论
文章列表
cat /data/apachelogs/access7272_log.20090707?? | awk -F"\"" '{if(index($2, "w|05002600")>0){sidx=index($2,"&i=");if(sidx>0){txt=substr($2, sidx+3);eidx=index(txt, "&");suid=substr(txt, 0, eidx-1);usermap[suid]++}}}END{l=0;for(suid in usermap ...
- 2009-07-08 12:23
- 浏览 622
- 评论(0)
# coding=gbk
import urllib
import re
def decodeQuery(query):
lowStr = query.lower()
if lowStr.find("%u")!=-1:
t = re.compile(r"%u([0-9a-f]{2})([0-9a-f]{2})",re.IGNORECASE)
matchList = t.findall(lowStr)
for match in matchList:
hex = match[0]+match[1]
...
- 2009-03-30 10:34
- 浏览 911
- 评论(0)
apache连接resin的配置
LoadModule caucho_module modules/mod_caucho.so.3.0
ResinConfigServer imgresin05 6802
#CauchoHost imgresin01 6802
<Location /pics>
SetHandler caucho-request
</Location>
- 2009-03-20 22:57
- 浏览 710
- 评论(0)
vim /etc/rsyncd.conf
文件内容如下
uid = root
gid = root
use chroot = no
hosts allow = 192.168.0.0/16 10.0.0.0/8
pid file = /var/run/rsyncd.pid
log file = /var/log/rsync.log
[root]
path = /
read only = no
配置完以后运行
rsync --daemon
- 2009-03-20 21:46
- 浏览 687
- 评论(0)
vim乱码的解决办法
vim ~/.vimrc
把文件内容更改为
set enc=prc
set fileencodings=prc,utf8
prc表示中文
- 2009-03-20 19:51
- 浏览 2951
- 评论(0)
1.在日志中查找
awk '$4~/p=40040103/&&$5~/index.htm/' cut.log.20090319
以"\t"分割,第4个元素含p=40040103,第5个元素含index.htm的行
- 2009-03-20 15:07
- 浏览 657
- 评论(0)
function readCookie (name) {
var nameEQ=name+"=";
var ca=document.cookie.split(';');
for(var i=0;i<ca.length;i++){
var c=ca[i];var idx=0;
while(c.charAt(idx)==' ')
idx++;
if(idx>0) ...
- 2009-03-19 22:08
- 浏览 766
- 评论(0)