美文网首页
How to handle archive.tar.gz

How to handle archive.tar.gz

作者: 一只揣着梦想远行的飞鸟 | 来源:发表于2019-04-02 18:53 被阅读0次

maybe you need know some options about tar:

-?, --help                       give this help list
-c, --create                     create a new archive
-x, --extract, --get             extract files from an archive
-t, --list                       list the contents of an archive
-f, --file=ARCHIVE               use archive file or device ARCHIVE
-z, --gzip, --gunzip, --ungzip   filter the archive through gzip
-v, --verbose                    verbosely list files processed

Simple to use:

  1. create a archive.tar.gz:
tar -czvf archive.tar.gz sourceFile
tar -czvf archive.tar.gz sourceFile1 sourceFile2 ... sourceFileN
example:
tar -czvf archive.tar foo bar  # Create archive.tar from files foo and bar.
  1. verbose a archive.tar.gz:
tar -tzvf archive.tar.gz
  1. extract a archive.tar.gz
tar -xzvf archive.tar.gz

相关文章

网友评论

      本文标题:How to handle archive.tar.gz

      本文链接:https://www.haomeiwen.com/subject/bqqnbqtx.html