Ubuntu 壓縮檔案命令

weixin_30639719發表於2020-04-05
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

轉載於:https://www.cnblogs.com/yaos/p/11023433.html

相關文章