1. 拷贝整个目录
#!/bin/bash
Usage()
{
echo "Pls input para"
}
if [ -z $1 ];then
Usage
exit 1
fi
cat $1|while read line
do
path=`echo "${line%/*}"`
mkdir -p "test$path"
cp -a $line test$path
done
2. 对比两个文件夹
for i in $(find v460 -type f);do file=$(echo $i|sed 's/v460/v452/g');if [ ! -f "$file" ];then echo $file;fi;done
阅读(1136) | 评论(0) | 转发(0) |