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