Description of tar command

Description of tar command

Exemple de commandes Tar

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Deflate / Compress
$ tar -czf archive.tar.gz /path/files

# Inflate / Uncompress
$ tar -xzf archive.tar.gz

# Extract file to a defined directory
$ tar -xzf archive.tar.gz -C /target/directory

# Append a file to an existing archive
$ tar -zu archive.tar.gz -C /target/file

Common options

  • z : compress with gzip
  • c : create an archive
  • u : append files which are newer than the corresponding copy ibn the archive
  • f : filename of the archive
  • v : verbose, display what is inflated or deflated
  • a : unlike of z, determine compression based on file extension
Licensed under CC BY-NC-SA 4.0
Généré avec Hugo
Thème Stack conçu par Jimmy