1:批量拷贝文件

version1:将目标文件拷贝至文件夹files中

path _list 为一个文件,内容为准备拷贝文件的路径(此版本是针对从svn log中读取的路径,所以脚本中对路径前的modified和added进行了处理)

#!/bin/sh 
#copy files
cat path_list | sed 's/modified   //g' | sed 's/added      //g' | cat | while read line
do
	echo '../../svn_new_base/Branches/EDF_June2016/'$line files/
	cp '../../svn_new_base/Branches/EDF_June2016/'$line files/
done

 

 

2:批量删除文件

#将当前文件夹中的建表的.sql文件和插入数据的.sql文件删除(包括子文件中的匹配项)

find . -type f -name "*table*.sql" -o -name "*data*.sql" | xargs rm

 

 

to be continued……

 

相关文章:

  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2021-10-19
  • 2021-12-28
  • 2021-07-24
猜你喜欢
  • 2021-06-02
  • 2022-12-23
  • 2021-12-15
  • 2021-11-27
  • 2021-10-13
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案