More efficient way to find & tar millions of files

前端 未结 9 577
一向
一向 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:45

    There is a utility for this called tarsplitter.

    tarsplitter -m archive -i folder/*.json -o archive.tar -p 8
    

    will use 8 threads to archive the files matching "folder/*.json" into an output archive of "archive.tar"

    https://github.com/AQUAOSOTech/tarsplitter

提交回复
热议问题