1、打包文件:
已知文件列表存储在new.txt,进行打包
tar cvf xx.tar `cat new.txt`
zip -r oozie.zip oozie
2、批量复制
#!/bin/bash while read line do sz $line done </tmp/xx.txt
while read line; do mkdir -p xx/${line%/*}; cp $line zhaoja/${line%/*} ; done <xx.txt
1、打包文件:
已知文件列表存储在new.txt,进行打包
tar cvf xx.tar `cat new.txt`
zip -r oozie.zip oozie
2、批量复制
#!/bin/bash while read line do sz $line done </tmp/xx.txt
while read line; do mkdir -p xx/${line%/*}; cp $line zhaoja/${line%/*} ; done <xx.txt