【find $HOME -type f -name "*.sh" | xargs tar cfvz /nfs/x230/my-shell-scripts.tgz】这种管道符方式,有时会不起作用,导致如果是时间条件的话,会不按条件,而将所有结果都输出到包中!【find /dir/to/search/ -name "*.doc" -exec tar -rvf out.tar {} \;】或【tar cvf - `find . -mtime -1 -type f -print` > updatefiles.tar】是我首选的两种方式!!目前还没有出过错!!!
评论
分享到微信
打开微信,点击顶部的“╋”, 使用“扫一扫”将网页分享至微信。