1XAR(1)                           User Commands                          XAR(1)
2
3
4

NAME

6       xar - eXtensible ARchiver
7

SYNOPSIS

9       xar -[ctx][v] ...
10

DESCRIPTION

12       The  XAR  project  aims to provide an easily extensible archive format.
13       Important design decisions include an easily extensible  XML  table  of
14       contents  (TOC) for random access to archived files, storing the TOC at
15       the beginning of  the  archive  to  allow  for  efficient  handling  of
16       streamed  archives,  the  ability  to handle files of arbitrarily large
17       sizes, the ability to choose independent encodings for individual files
18       in  the archive, the ability to store checksums for individual files in
19       both compressed and uncompressed form, and the ability to query the ta‐
20       ble of content's rich meta-data.
21

FUNCTIONS

23       One of the following options must be used:
24
25       -c     Creates an archive
26
27       -t     Lists the contents of an archive
28
29       -x     Extracts an archive
30
31       NOTE:  all  of the above require the use of the -f option (filename) as
32       this release of xar doesn't correctly handle pipes or sockets.
33
34       -f     The filename to use for creation, listing or  extraction.   With
35              extraction, this can be a POSIX regular expression.
36

OPTIONS

38       --compression
39              Specifies  the  compression  type  to  use.  Valid values: none,
40              gzip, bzip2, lzma (on some systems).  Default value: gzip
41
42       -C <path>
43              On extract, xar will chdir to the specified path before extract‐
44              ing the archive.
45
46       -a     Synonym for --compression=lzma
47
48       -j     Synonym for --compression=bzip2
49
50       -z     Synonym for --compression=gzip
51
52       --compression-args=<arguments>
53              Specifies  arguments  to the compression engine selected.  gzip,
54              bzip2, and lzma all take a single integer argument between 0 and
55              9 specifying the compression level to use.
56
57       --dump-toc=<filename>
58              Has xar dump the xml header into the specified file.  "-" can be
59              specified to mean stdout.
60
61       --dump-toc-cksum
62              Dumps the ToC checksum to stdout along with the algorithm of the
63              ToC.
64
65       --dump-header
66              Has xar print out the xar binary header information to stdout.
67
68       --extract-subdoc=<name>
69              Extracts  the  specified  subdocument to a document in cwd named
70              <name>.xml
71
72       --list-subdocs
73              List the subdocuments in the xml header
74
75       --toc-cksum
76              Specifies the hashing algorithm to use for xml header  verifica‐
77              tion.   Valid  values:  md5 (on some systems), sha1, sha256, and
78              sha512.  Default value: sha1
79
80       --file-cksum
81              Specifies the hashing algorithm to use for file content  verifi‐
82              cation.   Valid values: md5 (on some systems), sha1, sha256, and
83              sha512.  Default value: sha1
84
85       -l     On archival, stay on the local device.
86
87       -P     On extract, set ownership based on uid/gid.  If the uid/gid  can
88              be  set  on  the extracted file, setuid/setgid bits will also be
89              preserved.
90
91       -p     On extract, set ownership based on symbolic names, if  possible.
92              If  the  uid/gid can be set on the extracted file, setuid/setgid
93              bits will also be preserved.
94
95       -s <filename>
96              On extract, specifies the file to extract subdocuments  to.   On
97              archival, specifies an xml file to add as a subdocument.
98
99       -v     Verbose output
100
101       --exclude
102              Specifies  a  POSIX  regular expression of files to exclude from
103              adding to the archive during creation or  from  being  extracted
104              during extraction.  This option can be specified multiple times.
105
106       --rsize
107              Specifies  a size (in bytes) for the internal libxar read buffer
108              while performing I/O.
109
110       --coalesce-heap
111              When multiple files in the archive are identical, only store one
112              copy  of  the  data in the heap.  This creates smaller archives,
113              but the archives created are not streamable.
114
115       --link-same
116              When the data section of multiple files are identical,  hardlink
117              them within the archive.
118
119       --no-compress
120              Specifies  a  POSIX  regular expression of files to archive, but
121              not compress.  The archived files will be copied  raw  into  the
122              archive.  This can be used to exclude already gzipped files from
123              being gzipped during the archival process.
124
125       --prop-include
126              Specifies a file property to be included in the  archive.   When
127              this  option  is  specified,  only the specified options will be
128              included.  Anything not specifically included with  this  option
129              will be omitted.  This option can be used multiple times.
130
131       --prop-exclude
132              Specifies a file property to be excluded from the archive.  When
133              this option is specified, all file properties will  be  included
134              except the specified properties.  This option can be used multi‐
135              ple times.
136
137       --distribution
138              Creates an archive to only contain file properties safe for file
139              distribution.   Currently,  only  name, type, mode, and data are
140              preserved with this option.
141
142       --keep-existing
143              Does not overwrite existing files during extraction.  Keeps  any
144              previously existing files while extracting.
145
146       -k     Synonym for --keep-existing.
147
148       --keep-setuid
149              When extracting without -p or -P options, xar will extract files
150              as the uid/gid of the extracting process.   In  this  situation,
151              xar  will  strip setuid/setgid bits from the extracted files for
152              security reasons.  --keep-setuid will preserve the setuid/setgid
153              bits  even  though  the uid/gid of the extracted file is not the
154              same as the archived file.
155

EXAMPLES

157       xar -cf sample.xar /home/uid
158              Create a xar archive of all files in /home/uid
159
160       xar -tf sample.xar
161              List the contents of the xar archive sample.xar
162
163       xar -xf sample.xar
164              Extract the contents of sample.xar to the current working direc‐
165              tory
166

BUGS

168       Doesn't  currently  work  with  pipes  or streams.  Might be fixed in a
169       future release.
170
171       Probably one or two more somewhere in there. If  you  find  one  please
172       report it to http://code.google.com/p/xar/
173

AUTHORS

175       Rob Braun <bbraun AT synack DOT net>
176       Landon Fuller <landonf AT bikemonkey DOT org>
177       David Leimbach
178       Kevin Van Vechten
179
180
181
182
183version 1.8                      June 4, 2015                           XAR(1)
Impressum