2024-09-07 22:57:31 +00:00
|
|
|
.Dd October 8, 2015
|
2015-01-31 13:20:02 +00:00
|
|
|
.Dt TAR 1
|
2015-01-31 19:37:03 +00:00
|
|
|
.Os sbase
|
2015-01-31 13:05:23 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm tar
|
|
|
|
.Nd create, list or extract a tape archive
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl C Ar dir
|
2015-05-08 10:43:33 +00:00
|
|
|
.Op Fl J | Fl Z | Fl a | Fl j | Fl z
|
2015-02-08 22:16:27 +00:00
|
|
|
.Fl x Op Fl m | Fl t
|
|
|
|
.Op Fl f Ar file
|
2015-04-21 14:35:05 +00:00
|
|
|
.Op Ar file ...
|
2015-01-31 13:05:23 +00:00
|
|
|
.Nm
|
|
|
|
.Op Fl C Ar dir
|
2015-05-08 10:43:33 +00:00
|
|
|
.Op Fl J | Fl Z | Fl a | Fl j | Fl z
|
2015-02-09 21:42:56 +00:00
|
|
|
.Op Fl h
|
2015-04-21 14:35:05 +00:00
|
|
|
.Fl c Ar path ...
|
2015-02-08 22:16:27 +00:00
|
|
|
.Op Fl f Ar file
|
2015-01-31 13:05:23 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2015-02-08 22:16:27 +00:00
|
|
|
is the standard file archiver.
|
2015-01-31 13:05:23 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
.Bl -tag -width Ds
|
2015-04-21 14:35:05 +00:00
|
|
|
.It Fl c Ar path ...
|
2015-02-08 22:16:27 +00:00
|
|
|
Create archive from
|
2015-01-31 13:05:23 +00:00
|
|
|
.Ar path .
|
|
|
|
.It Fl C Ar dir
|
|
|
|
Change directory to
|
|
|
|
.Ar dir
|
|
|
|
before beginning.
|
2015-02-08 22:16:27 +00:00
|
|
|
.It Fl f Ar file
|
|
|
|
Set
|
|
|
|
.Ar file
|
2020-03-01 22:37:31 +00:00
|
|
|
as input | output archive instead of stdin | stdout.
|
|
|
|
If '-', stdin | stdout is used.
|
2015-01-31 13:05:23 +00:00
|
|
|
.It Fl m
|
|
|
|
Do not preserve modification time.
|
|
|
|
.It Fl t
|
2015-02-08 22:16:27 +00:00
|
|
|
List all files in the archive.
|
2015-01-31 13:05:23 +00:00
|
|
|
.It Fl x
|
2015-02-08 22:16:27 +00:00
|
|
|
Extract archive.
|
2015-02-09 21:42:56 +00:00
|
|
|
.It Fl h
|
|
|
|
Always dereference symbolic links while recursively traversing directories.
|
2015-05-08 10:43:33 +00:00
|
|
|
.It Fl J | Fl Z | Fl a | Fl j | Fl z
|
2020-03-01 22:37:31 +00:00
|
|
|
Use xz | compress | lzma | bzip2 | gzip compression or decompression.
|
|
|
|
These utilities must be installed separately.
|
2015-02-08 22:16:27 +00:00
|
|
|
Using these flags is discouraged in favour of the flexibility
|
|
|
|
and clarity of pipes:
|
|
|
|
.Bd -literal -offset indent
|
2015-05-08 10:43:33 +00:00
|
|
|
$ bzip2 -cd archive.tar.bz2 | tar -x
|
|
|
|
$ gzip -cd archive.tar.gz | tar -x
|
2015-02-08 22:16:27 +00:00
|
|
|
.Ed
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
$ tar -c file ... | bzip2 > archive.tar.bz2
|
|
|
|
$ tar -c file ... | gzip2 > archive.tar.gz
|
|
|
|
.Ed
|
2015-01-31 13:05:23 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ar 1 ,
|
|
|
|
.Xr bzip2 1 ,
|
|
|
|
.Xr gzip 1
|
2015-02-08 22:16:27 +00:00
|
|
|
.Sh STANDARDS
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is compliant with the UStar (Uniform Standard Tape ARchive)
|
|
|
|
format defined in the
|
|
|
|
.St -p1003.1-88
|
|
|
|
specification.
|