标签:shel shell mtime wiki 检查 cat name find oca
curtime=$(date +%Y%m%d%H%M)
for i in $@
do
find ${bkwikiLocation} -mtime +21 -name "${i}_*" -type d -exec rm -rf {} \;
if [ -d ${wikiLocation}${i} ]; then
mkdir ${bkwikiLocation}${i}_$curtime
cp -rf ${wikiLocation}${i}\/* ${bkwikiLocation}${i}_${curtime}
else
echo "请检查输入的模块是否正确."
fi
done
标签:shel shell mtime wiki 检查 cat name find oca
原文地址:http://www.cnblogs.com/season-xie/p/6827098.html