linux tar

NAME tar - manual page for tar 1.26

SYNOPSIS tar [OPTION...] [FILE]...

EXAMPLES

   tar -cf archive.tar foo bar
          # Create archive.tar from files foo and bar.

   tar -tvf archive.tar
          # List all files in archive.tar verbosely.

   tar -xf archive.tar
          # Extract all files from archive.tar.

   tar -zcvf deploy.tar.gz deploy  压缩

   tar -zxvf deploy.tar.gz  解压

Main operation mode:

   -A, --catenate, --concatenate
          append tar files to an archive

   -c, --create
          create a new archive

   -d, --diff, --compare
          find differences between archive and file system

   --delete
          delete from the archive (not on mag tapes!)

   -r, --append
          append files to the end of an archive

   -t, --list
          list the contents of an archive

   --test-label
          test the archive volume label and exit

   -u, --update
          only append files newer than copy in archive

   -x, --extract, --get
          extract files from an archive

Common options:

   -C, --directory=DIR
          change to directory DIR

   -f, --file=ARCHIVE
          use archive file or device ARCHIVE

   -j, --bzip2
          filter the archive through bzip2

    -J, --xz
          filter the archive through xz

   -p, --preserve-permissions
          extract  information  about  file permissions (default for superuser)

   -v, --verbose
          verbosely list files processed

   -z, --gzip
          filter the archive through gzip