CDN标准证书检验命令

openssl s_client -connect 101.26.39.11:443 -showcerts -servername secure.massmotionmedia.cn

openssl s_client -connect 101.26.39.11:443 -showcerts -servername secure.massmotionmedia.com

curl -v –resolve secure.massmotionmedia.com:443:101.26.39.11 “https://secure.massmotionmedia.com/crossdomain.xml”

curl -v –resolve secure.massmotionmedia.cn:443:101.26.39.11 “https://secure.massmotionmedia.cn/crossdomain.xml”

三剑客

grep -vwf  file1 file2           #统计file1中没有,file2中有的行

find /usr/local/nginx/conf/sslvhosts/ | xargs grep  “Access-Control-Allow-Origin”

find .   |xargs grep -ri “IBM”                -r 递归目录  -i 不区分大小写

 

for i in list.txt;do find . -name “$i” -exec rm {} \;;done

##-exec 传递find结果给{} \;变量,}和\之间有空格

for i in list.txt;do find . -name “$i” –ok rm {} \;;done

##-ok比-exec多一步确认(y)

find . -name “*.crt” |xargs -i cp {} dstdir/

##xargs 通过-i参数用{}代替find结果进行cp,类似-exec的{} /;

 

*/awk OFS=的作用以及sed对首、尾的处理*/

“a.b.crt”→“a.b”

cat 1.txt |awk -F . ‘OFS=”.”{$NF=””;print}’ |sed ‘s/.$//g’ >2.txt

##先去掉后缀crt再去掉最后的dian.

“./a.b.pem”→“a.b.pem”   ## find结果前面会带路径标识./

cat pem.txt |awk -F / ‘OFS=”/”{$1=””;print}’|sed ‘s/\///’ >pem2.txt