How to gzip all files in all sub-directories into one compressed file in bash

前端 未结 3 764
小蘑菇
小蘑菇 2021-01-29 17:36

Possible Duplicate:
gzipping up a set of directories and creating a tar compressed file

This post describes how t

3条回答
  •  爱一瞬间的悲伤
    2021-01-29 18:00

    @amitchhajer 's post works for GNU tar. If someone finds this post and needs it to work on a NON GNU system, they can do this:

    tar cvf - folderToCompress | gzip > compressFileName
    

    To expand the archive:

    zcat compressFileName | tar xvf -
    

提交回复
热议问题