More efficient way to find & tar millions of files

前端 未结 9 579
一向
一向 2021-01-30 17:53

I\'ve got a job running on my server at the command line prompt for a two days now:

find data/ -name filepattern-*2009* -exec tar uf 2009.tar {} ;
9条回答
  •  一整个雨季
    2021-01-30 18:46

    Simplest (also remove file after archive creation):

    find *.1  -exec tar czf '{}.tgz' '{}' --remove-files \;
    

提交回复
热议问题