commands

remove files after pack:

tar --remove-files -cf all.tar *

compression:

  • -j: bzip2
  • -z: gzip

add file to existed tarball: -r

tar -rf existed.tar file1

specify the dest folder to extract to:

tar -xvf all.tar -C /path/to/extract

原文地址:https://www.cnblogs.com/nn0p/p/4367586.html