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 ''>/tmp/
===============================
#!/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 &
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 ''>/tmp/
===============================
#!/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 &
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/8806316/viewspace-1007247/ ,如需转载,请注明出处,否则将追究法律责任。