curl

curl -x 24.10.28.84:32779 -o home.html http://blog.51yip.com
curl -r 0-100 -o img.part1 http://blog.51yip.com/wp-content/uploads/2010/09/compare_varnish.jpg
 
rsync命令详解

#!/bin/bash
#Author YuShiLin
#*/1 * * * * /root/http_code.sh

export LC_ALL=zh_CN.UTF-8
URL="2.1.1.1:880/pc_303.shtml"

HTTP_CODE=`curl -o /dev/null -s -w "%{http_code}" "${URL}"`
echo $HTTP_CODE

if [ $HTTP_CODE != 200 ];then
killall -9 java
killall -9 java
killall -9 nginx
killall -9 nginx
cd /opt/tomcat1/bin/
./startup.sh
cd /opt/tomcat2/bin/
./startup.sh
/opt/nginx3/sbin/nginx
/opt/nginx4/sbin/nginx

fi

你可能感兴趣的:(curl)