#################/usr/local/beifen.sh
#!/bin/sh
year=$(date +%Y)
month=$(date +%m)
date=$(date +%d)
time=$(date +%Y%m%d%H%M)
mkdir -p /usr/local/logbak/$year/$month/$date
cp /var/nat.log /usr/local/logbak/$year/$month/$date/$time.log
cat >; /var/nat.log; /var/nat.log &
#############################################
阅读(1600) | 评论(0) | 转发(0) |