【问题标题】:Use all cores when tar and splittingtar 和拆分时使用所有核心
【发布时间】:2017-11-11 07:30:52
【问题描述】:

我正在尝试让我的 tar 命令使用所有内核 (8),当我像这样打包成一个包时,我得到了它的工作:tar -I pigz -cf packed.tar.gz folder/。 它正在正常工作,它使用所有内核。

但是当我需要打包成多个文件时,我无法让它使用所有内核,这是我的命令:tar cvzf - folder/ | split --bytes=4GB - packed.tar.gz。 我怎样才能让这个命令使用所有核心而不是一个?

感谢所有输入。

【问题讨论】:

    标签: linux multithreading split compression tar


    【解决方案1】:

    使用多线程文件压缩工具pigz:

    tar -I pigz -cvf - folder/ | split --bytes=4GB - packed.tar.gz
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多