linux删除文件的shell

#!/bin/sh
#

cd /tmp
find . -name 'advertisement_column*.xml' -exec rm {} \;
find . -name 'basetemp*.xml' -exec rm {} \;
find . -name 'customerhis*.xml' -exec rm {} \;
find . -name 'diet_*.xml' -exec rm {} \;
find . -name 'due_*.xml' -exec rm {} \;
find . -name 'exercise*.xml' -exec rm {} \;
find . -name 'food_*.xml' -exec rm {} \;
find . -name 'fp_*.xml' -exec rm {} \;
find . -name 'friend_*.xml' -exec rm {} \;
find . -name 'mens*.xml' -exec rm {} \;
find . -name 'otg*.xml' -exec rm {} \;
find . -name 'no_*.xml' -exec rm {} \;
find . -name 'preg*.xml' -exec rm {} \;
find . -name 'rans*.xml' -exec rm {} \;
find . -name 'secret_*.xml' -exec rm {} \;
find . -name 'tanita*.xml' -exec rm {} \;
find . -name 'tera_*.xml' -exec rm {} \;
find . -name 'unsign_*.xml' -exec rm {} \;
find . -name 'user*.xml' -exec rm {} \;
find . -name 'weight*.xml' -exec rm {} \;

exit

删除文件的例子

你可能感兴趣的:(linux,shell,user,FP)