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

前端 未结 3 673
小蘑菇
小蘑菇 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:05

    tar -zcvf compressFileName.tar.gz folderToCompress
    

    everything in folderToCompress will go to compressFileName

    Edit: After review and comments I realized that people may get confused with compressFileName without an extension. If you want you can use .tar.gz extension(as suggested) with the compressFileName

提交回复
热议问题