linux拷贝文件去掉某个子目录脚本

linux拷贝文件去掉某个子目录 脚本

#!/bin/bash
to=/export/tmp/gerritcode/
for filename in `ls $to`;
do
    if [ $filename = ".git" ]||[ $filename = "myfile" ];then
        :
    else
        cp -r $filename /back
    fi
done

猜你喜欢

转载自liyonghui160com.iteye.com/blog/2203348