find,xargs,tar有选择打包

find ./ -mtime 83 -exec sz {} ;

find . -type f -exec ls -l {} ;

;表达 -exec 的结束。

==========================

[1]

find / -name "*.sh"|xargs tar -rf sh.tgz
[2]
find / -name "*.sh" -print > list
tar -T list -cvjf sh.tar.bz2

[3]

find . -name '*.sh' | xargs tar cvjf sh.tar.bz2
find . -name '*.sh' -print0 | xargs -0 tar cvjf sh.tar.bz2

参考:

http://brightconan.com/?p=47

原文地址:https://www.cnblogs.com/taosim/p/3993312.html