wangzhensheng - by - 22 七月, 2008 19:14

==========================
#!/bin/sh
apps_dir='/tmp/ddd/fj'

cd ${apps_dir}/
while read strs
do
echo ${strs}
find ./ -type f | xargs perl -pi -e "s|href="${strs}|href="/|g"
find ./ -type f | xargs perl -pi -e "s|href=" ${strs}|href="/|g"
find ./ -type f | xargs perl -pi -e "s|src="${strs}|src="/|g"
done < /tmp/ddd/string_file

 查看全文


wangzhensheng - by - 14 七月, 2008 14:55

find ./ -type f -print | xargs file | grep text |sed -e "s/:.*//" | xargs -i grep -l

'^M' {} > resultM.file
while read LINE
do
chmod 755 $LINE
dos2unix $LINE $LINE
done < resultM.file

==========================
递归查找字符
find ./sso/ -type f |grep -v 'log'|grep -v 'tar'| grep -v 'jpg'| grep -v 'JPG'|xargs grep -n 'www.sohu.com'>/tmp/www.sohu.com

===============================

#!/bin/sh
DIR="$1"
file="`echo $USER`"
file_1="`basename ${DIR}`"
find "${DIR}" -type f | xargs grep -n 'http://' | grep -v 'Binary' | grep -v 'http://www.w3.org' | grep -v 'http://developer.mozilla.org' | grep -v 'WEB-INF' | grep -v 'http://www.chinaunicom.com' | grep -v '__' > /tmp/${file}_${file_1}.log 2>&1 &

 查看全文


wangzhensheng - by - 09 四月, 2008 16:18

有时候在sun服务器上插入新硬盘后,用format不能识别可执行:

Solaris 8 and 以下用:

# modunload -i 0
# drvconfig
# devlinks
# disks

Solaris 9 and 以上用:

#devfsadm

 查看全文


博客日历
« 八月 2008 »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
搜索
管理控制台
TOP_Read
TOP_Reply
New_Reply
文章分类
网站链接
新闻聚合
RSS 0.90
RSS 1.0
RSS 2.0
Atom 0.3