[root@d-web2-200 ~]# cat file_not.sh
#!/bin/bash
date=`date "+%Y-%m-%d %H:%M:%S"`
path1='/wwwroothtml/wwwroot/www.upetmart.com/data/upload/1.txt'
if [ -e $path1 ];then
echo 'ok'
else
echo "$date 链接失效" > /opt/log.txt
cd /wwwroothtml/wwwroot/www.upetmart.com/data
rm -rf upload && ln -s /test /wwwroothtml/wwwroot/www.upetmart.com/data/upload
fi