6 intro: Concatenate, Deflate, Inflate files
11 ### Deflate / Inflate / Concatenate
14 tar -czf archive.tar.gz /path/files
18 # Inflate / Uncompress
19 tar -xzf archive.tar.gz
23 # Concatenate files into a single tar
24 tar -cf archive.tar /path/files
28 # Extract file to a defined directory
29 tar -xzf archive.tar.gz -C /target/directory
33 # Append a file to an existing archive
34 tar -zu archive.tar.gz -C /target/file
39 | Option | Description |
40 |--------|--------------------------------------------------------------------------|
41 | `z` | compress with gzip |
42 | `c` | create an archive |
43 | `u` | append files which are newer than the corresponding copy ibn the archive |
44 | `f` | filename of the archive |
45 | `v` | verbose, display what is inflated or deflated |
46 | `a` | unlike of `z`, determine compression based on file extension |