您的位置:首页 > 其它

"IIS配置401错误"解决方法

2007-06-27 09:28 197 查看
#vi 1sh && chmod +x 1.sh

LOG_DIR=/var/log1

ROOT_UID=0

LINES=50

ERROR_CANTCD=112

ERROR_NOTROOT=765

if [ "$UID" -ne "$ROOT_UID" ]

then

echo "only root can run this script"

exit $ERROR_NOTROOT

if [ -n "$1" ]

then

lines=$1

else

lines=$LINES

fi

cd $LOG_DIR

if [ `pwd` != $LOG_DIR ]

then

echo "can not change to $LOG_DIR"

exit $ERROR_CANTCD

tail -$lines messages > mesg.tmp

mv mesg.tmp

echo "logs cleaned"

exit 0
本文出自 “风继续吹” 博客,请务必保留此出处http://fengjixuchui.blog.51cto.com/854545/427821
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐