blob: 036d2c712e2be365aedb72e89209358f9ebc0884 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
## Name
tar - file archiving utility
## Synopsis
```**sh
$ tar [--create] [--extract] [--list] [--verbose] [--gzip] [--file FILE] [PATHS...]
```
## Description
tar is an archiving utility designed to store multiple files in an archive file
(tarball).
Files may also be compressed and decompressed using GNU Zip (GZIP) compression.
## Options
* `-c`, `--create`: Create archive
* `-x`, `--extract`: Extract archive
* `-t`, `--list`: List contents
* `-v`, `--verbose`: Print paths
* `-z`, `--gzip`: compress or uncompress file using gzip
* `-f`, `--file`: Archive file
## Examples
```sh
# List the contents of archive.tar
$ tar -t -f archive.tar
# Extract the contents from archive.tar.gz
$ tar -x -z -f archive.tar.gz
# Extract the contents from archive.tar
$ tar -x -f archive.tar
```
## See also
* [`gunzip`(1)](gunzip.md)
* [`unzip`(1)](unzip.md)
|