【发布时间】:2018-08-17 01:16:12
【问题描述】:
我需要从下面的脚本中排除一个文件类型。谁能告诉我为具有 .partial 扩展名的文件添加和排除什么?
#!/bin/bash
cd /data/user1/upload
thetime=`date +%Y-%m-%d_%H:%M:%S` #
for i in *.*
do
extn=${i##*.} # save the extension of the file
mv "$i" "${i%.*}"$(date "+_%Y-%m-%d_%H:%M:%S.${extn}")
done
mv *.* /test/user1
【问题讨论】: