curtime=$(date +%Y%m%d%H%M)
for i in [email protected]
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
时间: 2024-10-29 03:35:44