1. 程式人生 > >常用shell

常用shell

then fin cati wiki location ati ech name for

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

常用shell