开发目录清理脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/sh function usage() { echo "usage: <source dir>" } if [ $ARGC != 1 ] || [ -d $1 ];then usage exit fi DIR=$1 for i in `find $DIR -type f -name '*.log'`;do rm -f $i;done for i in `find $DIR -type f -name '*.o'`;do rm -f $i;done for i in `find $DIR -type f -name '*.a'`;do rm -f $i;done for i in `find $DIR -type f -perm +100`;do rm $i;done |

