tar.1 (1815B)
1 .Dd October 8, 2015 2 .Dt TAR 1 3 .Os sbase 4 .Sh NAME 5 .Nm tar 6 .Nd create, list or extract a tape archive 7 .Sh SYNOPSIS 8 .Nm 9 .Cm x | Cm t | Fl x | Fl t 10 .Op Fl C Ar dir 11 .Op Fl J | Fl Z | Fl a | Fl j | Fl z 12 .Op Fl m 13 .Op Fl p 14 .Op Fl f Ar file 15 .Op Ar file ... 16 .Nm 17 .Cm c | Fl c Op Fl C Ar dir 18 .Op Fl J | Fl Z | Fl a | Fl j | Fl z 19 .Op Fl h 20 .Ar path ... 21 .Op Fl f Ar file 22 .Sh DESCRIPTION 23 .Nm 24 is the standard file archiver. 25 .Sh OPTIONS 26 .Bl -tag -width Ds 27 .It Fl c Ar path ... 28 Create archive from 29 .Ar path . 30 .It Fl C Ar dir 31 Change directory to 32 .Ar dir 33 before beginning. 34 .It Fl f Ar file 35 Set 36 .Ar file 37 as input | output archive instead of stdin | stdout. 38 If '-', stdin | stdout is used. 39 .It Fl m 40 Do not preserve modification time. 41 .It Fl t 42 List all files in the archive. 43 .It Fl x 44 Extract archive. 45 .It Fl h 46 Always dereference symbolic links while recursively traversing directories. 47 .It Fl J | Fl Z | Fl a | Fl j | Fl z 48 Use xz | compress | lzma | bzip2 | gzip compression or decompression. 49 These utilities must be installed separately. 50 Using these flags is discouraged in favour of the flexibility 51 and clarity of pipes: 52 .Bd -literal -offset indent 53 $ bzip2 -cd archive.tar.bz2 | tar -x 54 $ gzip -cd archive.tar.gz | tar -x 55 .Ed 56 .Bd -literal -offset indent 57 $ tar -c file ... | bzip2 > archive.tar.bz2 58 $ tar -c file ... | gzip2 > archive.tar.gz 59 .Ed 60 .El 61 .Sh SEE ALSO 62 .Xr ar 1 , 63 .Xr bzip2 1 , 64 .Xr gzip 1 65 .Sh STANDARDS 66 The 67 .Nm 68 utility is compliant with the UStar (Uniform Standard Tape ARchive) 69 format defined in the 70 .St -p1003.1-88 71 specification. For long file paths (>99 bytes), the UStar, 'L' and 'x' 72 header formats are supported for reading (to a maximum size of PATH_MAX 73 or 255 bytes, depending on format), and the 'L' format is supported for 74 writing (with unlimited path size). Link targets are limited to the 75 UStar maximum of 100 bytes.