Ubuntu 压缩文件命令

tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
  • -c: Create an archive.
  • -z: Compress the archive with gzip.
  • -v: Display progress in the terminal while creating the archive, also known as “verbose” mode. The v is always optional in these commands, but it’s helpful.
  • -f: Allows you to specify the filename of the archive.

两个例子,

tar -czvf archive.tar.gz stuff
tar -czvf archive.tar.gz /usr/local/something
posted @ 2019-06-14 15:18  2021年的顺遂平安君  阅读(65)  评论(0编辑  收藏  举报