| 1 | .\" $MirOS: src/bin/pax/cpio.1,v 1.31 2012/02/16 16:01:08 tg Exp $
|
|---|
| 2 | .\" $OpenBSD: cpio.1,v 1.34 2011/09/03 22:59:08 jmc Exp $
|
|---|
| 3 | .\"
|
|---|
| 4 | .\" Copyright (c) 2005, 2009, 2011, 2012
|
|---|
| 5 | .\" Thorsten Glaser <tg@mirbsd.org>
|
|---|
| 6 | .\" Copyright (c) 1997 SigmaSoft, Th. Lockert
|
|---|
| 7 | .\" All rights reserved.
|
|---|
| 8 | .\"
|
|---|
| 9 | .\" Redistribution and use in source and binary forms, with or without
|
|---|
| 10 | .\" modification, are permitted provided that the following conditions
|
|---|
| 11 | .\" are met:
|
|---|
| 12 | .\" 1. Redistributions of source code must retain the above copyright
|
|---|
| 13 | .\" notice, this list of conditions and the following disclaimer.
|
|---|
| 14 | .\" 2. Redistributions in binary form must reproduce the above copyright
|
|---|
| 15 | .\" notice, this list of conditions and the following disclaimer in the
|
|---|
| 16 | .\" documentation and/or other materials provided with the distribution.
|
|---|
| 17 | .\"
|
|---|
| 18 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|---|
| 19 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|---|
| 20 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|---|
| 21 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|---|
| 22 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|---|
| 23 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|---|
| 24 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|---|
| 25 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|---|
| 26 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|---|
| 27 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 28 | .\"-
|
|---|
| 29 | .\" Try to make GNU groff and AT&T nroff more compatible
|
|---|
| 30 | .\" * ` generates ‘ in gnroff, so use \`
|
|---|
| 31 | .\" * ' generates ’ in gnroff, \' generates ´, so use \*(aq
|
|---|
| 32 | .\" * - generates ‐ in gnroff, \- generates −, so .tr it to -
|
|---|
| 33 | .\" thus use - for hyphens and \- for minus signs and option dashes
|
|---|
| 34 | .\" * ~ is size-reduced and placed atop in groff, so use \*(TI
|
|---|
| 35 | .\" * ^ is size-reduced and placed atop in groff, so use \*(ha
|
|---|
| 36 | .\" * \(en does not work in nroff, so use \*(en
|
|---|
| 37 | .\" The section after the "doc" macropackage has been loaded contains
|
|---|
| 38 | .\" additional code to convene between the UCB mdoc macropackage (and
|
|---|
| 39 | .\" its variant as BSD mdoc in groff) and the GNU mdoc macropackage.
|
|---|
| 40 | .\"
|
|---|
| 41 | .ie \n(.g \{\
|
|---|
| 42 | . if \*[.T]ascii .tr \-\N'45'
|
|---|
| 43 | . if \*[.T]latin1 .tr \-\N'45'
|
|---|
| 44 | . if \*[.T]utf8 .tr \-\N'45'
|
|---|
| 45 | . ds <= \[<=]
|
|---|
| 46 | . ds >= \[>=]
|
|---|
| 47 | . ds Rq \[rq]
|
|---|
| 48 | . ds Lq \[lq]
|
|---|
| 49 | . ds sL \(aq
|
|---|
| 50 | . ds sR \(aq
|
|---|
| 51 | . if \*[.T]utf8 .ds sL `
|
|---|
| 52 | . if \*[.T]ps .ds sL `
|
|---|
| 53 | . if \*[.T]utf8 .ds sR '
|
|---|
| 54 | . if \*[.T]ps .ds sR '
|
|---|
| 55 | . ds aq \(aq
|
|---|
| 56 | . ds TI \(ti
|
|---|
| 57 | . ds ha \(ha
|
|---|
| 58 | . ds en \(en
|
|---|
| 59 | .\}
|
|---|
| 60 | .el \{\
|
|---|
| 61 | . ds aq '
|
|---|
| 62 | . ds TI ~
|
|---|
| 63 | . ds ha ^
|
|---|
| 64 | . ds en \(em
|
|---|
| 65 | .\}
|
|---|
| 66 | .\"
|
|---|
| 67 | .\" Implement .Dd with the Mdocdate RCS keyword
|
|---|
| 68 | .\"
|
|---|
| 69 | .rn Dd xD
|
|---|
| 70 | .de Dd
|
|---|
| 71 | .ie \\$1$Mdocdate: \{\
|
|---|
| 72 | . xD \\$2 \\$3, \\$4
|
|---|
| 73 | .\}
|
|---|
| 74 | .el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
|
|---|
| 75 | ..
|
|---|
| 76 | .\"
|
|---|
| 77 | .\" .Dd must come before definition of .Mx, because when called
|
|---|
| 78 | .\" with -mandoc, it might implement .Mx itself, but we want to
|
|---|
| 79 | .\" use our own definition. And .Dd must come *first*, always.
|
|---|
| 80 | .\"
|
|---|
| 81 | .Dd $Mdocdate: February 16 2012 $
|
|---|
| 82 | .\"
|
|---|
| 83 | .\" Check which macro package we use
|
|---|
| 84 | .\"
|
|---|
| 85 | .ie \n(.g \{\
|
|---|
| 86 | . ie d volume-ds-1 .ds tT gnu
|
|---|
| 87 | . el .ds tT bsd
|
|---|
| 88 | .\}
|
|---|
| 89 | .el .ds tT ucb
|
|---|
| 90 | .\"
|
|---|
| 91 | .\" Implement .Mx (MirBSD)
|
|---|
| 92 | .\"
|
|---|
| 93 | .ie "\*(tT"gnu" \{\
|
|---|
| 94 | . eo
|
|---|
| 95 | . de Mx
|
|---|
| 96 | . nr curr-font \n[.f]
|
|---|
| 97 | . nr curr-size \n[.ps]
|
|---|
| 98 | . ds str-Mx \f[\n[curr-font]]\s[\n[curr-size]u]
|
|---|
| 99 | . ds str-Mx1 \*[Tn-font-size]\%MirOS\*[str-Mx]
|
|---|
| 100 | . if !\n[arg-limit] \
|
|---|
| 101 | . if \n[.$] \{\
|
|---|
| 102 | . ds macro-name Mx
|
|---|
| 103 | . parse-args \$@
|
|---|
| 104 | . \}
|
|---|
| 105 | . if (\n[arg-limit] > \n[arg-ptr]) \{\
|
|---|
| 106 | . nr arg-ptr +1
|
|---|
| 107 | . ie (\n[type\n[arg-ptr]] == 2) \
|
|---|
| 108 | . as str-Mx1 \~\*[arg\n[arg-ptr]]
|
|---|
| 109 | . el \
|
|---|
| 110 | . nr arg-ptr -1
|
|---|
| 111 | . \}
|
|---|
| 112 | . ds arg\n[arg-ptr] "\*[str-Mx1]
|
|---|
| 113 | . nr type\n[arg-ptr] 2
|
|---|
| 114 | . ds space\n[arg-ptr] "\*[space]
|
|---|
| 115 | . nr num-args (\n[arg-limit] - \n[arg-ptr])
|
|---|
| 116 | . nr arg-limit \n[arg-ptr]
|
|---|
| 117 | . if \n[num-args] \
|
|---|
| 118 | . parse-space-vector
|
|---|
| 119 | . print-recursive
|
|---|
| 120 | ..
|
|---|
| 121 | . ec
|
|---|
| 122 | . ds sP \s0
|
|---|
| 123 | . ds tN \*[Tn-font-size]
|
|---|
| 124 | .\}
|
|---|
| 125 | .el \{\
|
|---|
| 126 | . de Mx
|
|---|
| 127 | . nr cF \\n(.f
|
|---|
| 128 | . nr cZ \\n(.s
|
|---|
| 129 | . ds aa \&\f\\n(cF\s\\n(cZ
|
|---|
| 130 | . if \\n(aC==0 \{\
|
|---|
| 131 | . ie \\n(.$==0 \&MirOS\\*(aa
|
|---|
| 132 | . el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
|
|---|
| 133 | . \}
|
|---|
| 134 | . if \\n(aC>\\n(aP \{\
|
|---|
| 135 | . nr aP \\n(aP+1
|
|---|
| 136 | . ie \\n(C\\n(aP==2 \{\
|
|---|
| 137 | . as b1 \&MirOS\ #\&\\*(A\\n(aP\\*(aa
|
|---|
| 138 | . ie \\n(aC>\\n(aP \{\
|
|---|
| 139 | . nr aP \\n(aP+1
|
|---|
| 140 | . nR
|
|---|
| 141 | . \}
|
|---|
| 142 | . el .aZ
|
|---|
| 143 | . \}
|
|---|
| 144 | . el \{\
|
|---|
| 145 | . as b1 \&MirOS\\*(aa
|
|---|
| 146 | . nR
|
|---|
| 147 | . \}
|
|---|
| 148 | . \}
|
|---|
| 149 | ..
|
|---|
| 150 | .\}
|
|---|
| 151 | .\"-
|
|---|
| 152 | .ie \ng==1 \{\
|
|---|
| 153 | . ds nc mircpio
|
|---|
| 154 | . ds np mirpax
|
|---|
| 155 | . ds nt mirtar
|
|---|
| 156 | . ds nm mircpio
|
|---|
| 157 | . Dt MIRCPIO 1
|
|---|
| 158 | .\}
|
|---|
| 159 | .el .ie \ng==2 \{\
|
|---|
| 160 | . ds nc paxcpio
|
|---|
| 161 | . ds np pax
|
|---|
| 162 | . ds nt paxtar
|
|---|
| 163 | . ds nm paxcpio
|
|---|
| 164 | . Dt PAXCPIO 1
|
|---|
| 165 | .\}
|
|---|
| 166 | .el \{\
|
|---|
| 167 | . ds nc cpio
|
|---|
| 168 | . ds np pax
|
|---|
| 169 | . ds nt tar
|
|---|
| 170 | . ds nm cpio
|
|---|
| 171 | . Dt CPIO 1
|
|---|
| 172 | .\}
|
|---|
| 173 | .\"-
|
|---|
| 174 | .Os MirBSD
|
|---|
| 175 | .Sh NAME
|
|---|
| 176 | .ie \ng==1 \{\
|
|---|
| 177 | .Nm mircpio
|
|---|
| 178 | .Nd copy file archives in and out
|
|---|
| 179 | .\}
|
|---|
| 180 | .el .ie \ng==2 \{\
|
|---|
| 181 | .Nm paxcpio
|
|---|
| 182 | .Nd copy file archives in and out
|
|---|
| 183 | .\}
|
|---|
| 184 | .el \{\
|
|---|
| 185 | .Nm cpio
|
|---|
| 186 | .Nd copy file archives in and out
|
|---|
| 187 | .\}
|
|---|
| 188 | .Sh SYNOPSIS
|
|---|
| 189 | .Nm \*(nm
|
|---|
| 190 | .Fl o
|
|---|
| 191 | .Op Fl AaBcJjLVvZz
|
|---|
| 192 | .Op Fl C Ar bytes
|
|---|
| 193 | .Op Fl F Ar archive
|
|---|
| 194 | .Op Fl H Ar format
|
|---|
| 195 | .Op Fl M Ar flag
|
|---|
| 196 | .Op Fl O Ar archive
|
|---|
| 197 | .No \*(Lt Ar name-list
|
|---|
| 198 | .Op \*(Gt Ar archive
|
|---|
| 199 | .Nm \*(nm
|
|---|
| 200 | .Fl i
|
|---|
| 201 | .Op Fl 6BbcdfJjmrSstuVvZz
|
|---|
| 202 | .Op Fl C Ar bytes
|
|---|
| 203 | .Op Fl E Ar file
|
|---|
| 204 | .Op Fl F Ar archive
|
|---|
| 205 | .Op Fl H Ar format
|
|---|
| 206 | .Op Fl I Ar archive
|
|---|
| 207 | .Op Fl M Ar flag
|
|---|
| 208 | .Op Ar pattern ...
|
|---|
| 209 | .Op \*(Lt Ar archive
|
|---|
| 210 | .Nm \*(nm
|
|---|
| 211 | .Fl p
|
|---|
| 212 | .Op Fl adLlmuVv
|
|---|
| 213 | .Ar destination-directory
|
|---|
| 214 | .No \*(Lt Ar name-list
|
|---|
| 215 | .Sh DESCRIPTION
|
|---|
| 216 | The
|
|---|
| 217 | .Nm
|
|---|
| 218 | command copies files to and from a
|
|---|
| 219 | .Nm cpio
|
|---|
| 220 | archive.
|
|---|
| 221 | .Pp
|
|---|
| 222 | The options are as follows:
|
|---|
| 223 | .Bl -tag -width Ds
|
|---|
| 224 | .It Fl o
|
|---|
| 225 | Create an archive.
|
|---|
| 226 | Reads the list of files to store in the
|
|---|
| 227 | archive from standard input, and writes the archive on standard
|
|---|
| 228 | output.
|
|---|
| 229 | .Bl -tag -width Ds
|
|---|
| 230 | .It Fl A
|
|---|
| 231 | Append to the specified archive.
|
|---|
| 232 | .It Fl a
|
|---|
| 233 | Reset the access times on files that have been copied to the
|
|---|
| 234 | archive.
|
|---|
| 235 | .It Fl B
|
|---|
| 236 | Set block size of output to 5120 bytes.
|
|---|
| 237 | .It Fl C Ar bytes
|
|---|
| 238 | Set the block size of output to
|
|---|
| 239 | .Ar bytes .
|
|---|
| 240 | .It Fl c
|
|---|
| 241 | Use ASCII format for
|
|---|
| 242 | .Nm cpio
|
|---|
| 243 | header for portability.
|
|---|
| 244 | .It Fl F Ar archive
|
|---|
| 245 | Use the specified file as the input for the archive.
|
|---|
| 246 | .It Fl H Ar format
|
|---|
| 247 | Write the archive in the specified format.
|
|---|
| 248 | Recognised formats are:
|
|---|
| 249 | .Pp
|
|---|
| 250 | .Bl -tag -width sv4cpio -compact
|
|---|
| 251 | .It Ar ar
|
|---|
| 252 | Unix Archiver.
|
|---|
| 253 | .It Ar bcpio
|
|---|
| 254 | Old binary
|
|---|
| 255 | .Nm cpio
|
|---|
| 256 | format.
|
|---|
| 257 | Selected by
|
|---|
| 258 | .Fl 6 .
|
|---|
| 259 | .It Ar cpio
|
|---|
| 260 | Old octal character
|
|---|
| 261 | .Nm cpio
|
|---|
| 262 | format.
|
|---|
| 263 | Selected by
|
|---|
| 264 | .Fl c .
|
|---|
| 265 | .It Ar sv4cpio
|
|---|
| 266 | SVR4 hex
|
|---|
| 267 | .Nm cpio
|
|---|
| 268 | format.
|
|---|
| 269 | .It Ar sv4crc
|
|---|
| 270 | SVR4 hex
|
|---|
| 271 | .Nm cpio
|
|---|
| 272 | format with checksums.
|
|---|
| 273 | This is the default format for creating new archives.
|
|---|
| 274 | .It Ar tar
|
|---|
| 275 | Old tar format.
|
|---|
| 276 | .It Ar ustar
|
|---|
| 277 | POSIX ustar format.
|
|---|
| 278 | .It "\ "
|
|---|
| 279 | .It Ar bin
|
|---|
| 280 | These four formats...
|
|---|
| 281 | .It Ar crc
|
|---|
| 282 | \&...are supported...
|
|---|
| 283 | .It Ar newc
|
|---|
| 284 | \&...for backwards...
|
|---|
| 285 | .It Ar odc
|
|---|
| 286 | \&...compatibility only.
|
|---|
| 287 | .El
|
|---|
| 288 | .It Fl J
|
|---|
| 289 | Use the xz utility to compress the archive.
|
|---|
| 290 | .It Fl j
|
|---|
| 291 | Use the bzip2 utility to compress the archive.
|
|---|
| 292 | .It Fl L
|
|---|
| 293 | Follow symbolic links.
|
|---|
| 294 | .It Fl M Ar flag
|
|---|
| 295 | Configure the archive normaliser.
|
|---|
| 296 | .Ar flag
|
|---|
| 297 | is either a numeric value compatible to
|
|---|
| 298 | .Xr strtonum 3
|
|---|
| 299 | which is directly stored in the flags word, or
|
|---|
| 300 | one of the following values, optionally prefixed with
|
|---|
| 301 | .Dq no\-
|
|---|
| 302 | to turn them off:
|
|---|
| 303 | .Pp
|
|---|
| 304 | .Bl -tag -width xxxxxx -compact
|
|---|
| 305 | .It Ar inodes
|
|---|
| 306 | 0x0001: Serialise inodes, zero device info.
|
|---|
| 307 | .br
|
|---|
| 308 | (cpio, sv4cpio, sv4crc)
|
|---|
| 309 | .It Ar links
|
|---|
| 310 | 0x0002: Store content of hard links only once.
|
|---|
| 311 | .br
|
|---|
| 312 | (cpio, sv4cpio, sv4crc)
|
|---|
| 313 | .It Ar mtime
|
|---|
| 314 | 0x0004: Zero out the file modification time.
|
|---|
| 315 | .br
|
|---|
| 316 | (ar, cpio, sv4cpio, sv4crc, ustar)
|
|---|
| 317 | .It Ar uidgid
|
|---|
| 318 | 0x0008: Set owner to 0:0 (root:wheel).
|
|---|
| 319 | .br
|
|---|
| 320 | (ar, cpio, sv4cpio, sv4crc, ustar)
|
|---|
| 321 | .It Ar verb
|
|---|
| 322 | 0x0010: Debug this option.
|
|---|
| 323 | .It Ar debug
|
|---|
| 324 | 0x0020: Debug file header storage.
|
|---|
| 325 | .It Ar lncp
|
|---|
| 326 | 0x0040: Extract hard links by copy if link fails.
|
|---|
| 327 | .It Ar numid
|
|---|
| 328 | 0x0080: Use only numeric uid and gid values.
|
|---|
| 329 | .br
|
|---|
| 330 | (ustar)
|
|---|
| 331 | .It Ar gslash
|
|---|
| 332 | 0x0100: Append a slash after directory names.
|
|---|
| 333 | .br
|
|---|
| 334 | (ustar)
|
|---|
| 335 | .It Ar set
|
|---|
| 336 | 0x0003: Keep ownership and mtime intact.
|
|---|
| 337 | .It Ar dist
|
|---|
| 338 | 0x008B: Clean everything except mtime.
|
|---|
| 339 | .It Ar norm
|
|---|
| 340 | 0x008F: Clean everything.
|
|---|
| 341 | .It Ar root
|
|---|
| 342 | 0x0089: Clean owner and device information.
|
|---|
| 343 | .El
|
|---|
| 344 | .Pp
|
|---|
| 345 | This option is only implemented for the ar, cpio, sv4cpio,
|
|---|
| 346 | sv4crc, and ustar file format writing routines.
|
|---|
| 347 | .It Fl O Ar archive
|
|---|
| 348 | Use the specified file name as the archive to write to.
|
|---|
| 349 | .It Fl V
|
|---|
| 350 | Print a dot
|
|---|
| 351 | .Pq Sq .\&
|
|---|
| 352 | for each file written to the archive.
|
|---|
| 353 | .It Fl v
|
|---|
| 354 | Be verbose about operations.
|
|---|
| 355 | List filenames as they are written to the archive.
|
|---|
| 356 | .It Fl Z
|
|---|
| 357 | Use the
|
|---|
| 358 | .Xr compress 1
|
|---|
| 359 | utility to compress the archive.
|
|---|
| 360 | .It Fl z
|
|---|
| 361 | Use the
|
|---|
| 362 | .Xr gzip 1
|
|---|
| 363 | utility to compress the archive.
|
|---|
| 364 | .El
|
|---|
| 365 | .It Fl i
|
|---|
| 366 | Restore files from an archive.
|
|---|
| 367 | Reads the archive file from
|
|---|
| 368 | standard input and extracts files matching the
|
|---|
| 369 | .Ar patterns
|
|---|
| 370 | that were specified on the command line.
|
|---|
| 371 | .Bl -tag -width Ds
|
|---|
| 372 | .It Fl 6
|
|---|
| 373 | Process old-style
|
|---|
| 374 | .Nm cpio
|
|---|
| 375 | format archives.
|
|---|
| 376 | .It Fl B
|
|---|
| 377 | Set the block size of the archive being read to 5120 bytes.
|
|---|
| 378 | .It Fl b
|
|---|
| 379 | Do byte and word swapping after reading in data from the
|
|---|
| 380 | archive, for restoring archives created on systems with
|
|---|
| 381 | a different byte order.
|
|---|
| 382 | .It Fl C Ar bytes
|
|---|
| 383 | Read archive written with a block size of
|
|---|
| 384 | .Ar bytes .
|
|---|
| 385 | .It Fl c
|
|---|
| 386 | Expect the archive headers to be in ASCII format.
|
|---|
| 387 | .It Fl d
|
|---|
| 388 | Create any intermediate directories as needed during
|
|---|
| 389 | restore.
|
|---|
| 390 | .It Fl E Ar file
|
|---|
| 391 | Read list of file name patterns to extract or list from
|
|---|
| 392 | .Ar file .
|
|---|
| 393 | .It Fl F Ar archive , Fl I Ar archive
|
|---|
| 394 | Use the specified file as the input for the archive.
|
|---|
| 395 | .It Fl f
|
|---|
| 396 | Restore all files except those matching the
|
|---|
| 397 | .Ar patterns
|
|---|
| 398 | given on the command line.
|
|---|
| 399 | .It Fl H Ar format
|
|---|
| 400 | Read an archive of the specified format.
|
|---|
| 401 | Recognised formats are:
|
|---|
| 402 | .Pp
|
|---|
| 403 | .Bl -tag -width sv4cpio -compact
|
|---|
| 404 | .It Ar ar
|
|---|
| 405 | Unix Archiver.
|
|---|
| 406 | .It Ar bcpio
|
|---|
| 407 | Old binary
|
|---|
| 408 | .Nm cpio
|
|---|
| 409 | format.
|
|---|
| 410 | .It Ar cpio
|
|---|
| 411 | Old octal character
|
|---|
| 412 | .Nm cpio
|
|---|
| 413 | format.
|
|---|
| 414 | .It Ar sv4cpio
|
|---|
| 415 | SVR4 hex
|
|---|
| 416 | .Nm cpio
|
|---|
| 417 | format.
|
|---|
| 418 | .It Ar sv4crc
|
|---|
| 419 | SVR4 hex
|
|---|
| 420 | .Nm cpio
|
|---|
| 421 | format with checksums.
|
|---|
| 422 | .It Ar tar
|
|---|
| 423 | Old tar format.
|
|---|
| 424 | .It Ar ustar
|
|---|
| 425 | POSIX ustar format.
|
|---|
| 426 | .It "\ "
|
|---|
| 427 | .It Ar bin
|
|---|
| 428 | These four formats...
|
|---|
| 429 | .It Ar crc
|
|---|
| 430 | \&...are supported...
|
|---|
| 431 | .It Ar newc
|
|---|
| 432 | \&...for backwards...
|
|---|
| 433 | .It Ar odc
|
|---|
| 434 | \&...compatibility only.
|
|---|
| 435 | .El
|
|---|
| 436 | .It Fl J
|
|---|
| 437 | Use the xz utility to decompress the archive.
|
|---|
| 438 | .It Fl j
|
|---|
| 439 | Use the bzip2 utility to decompress the archive.
|
|---|
| 440 | .It Fl m
|
|---|
| 441 | Restore modification times on files.
|
|---|
| 442 | .It Fl r
|
|---|
| 443 | Rename restored files interactively.
|
|---|
| 444 | .It Fl S
|
|---|
| 445 | Swap words after reading data from the archive.
|
|---|
| 446 | .It Fl s
|
|---|
| 447 | Swap bytes after reading data from the archive.
|
|---|
| 448 | .It Fl t
|
|---|
| 449 | Only list the contents of the archive, no files or
|
|---|
| 450 | directories will be created.
|
|---|
| 451 | .It Fl u
|
|---|
| 452 | Overwrite files even when the file in the archive is
|
|---|
| 453 | older than the one that will be overwritten.
|
|---|
| 454 | .It Fl V
|
|---|
| 455 | Print a dot
|
|---|
| 456 | .Pq Sq .\&
|
|---|
| 457 | for each file read from the archive.
|
|---|
| 458 | .It Fl v
|
|---|
| 459 | Be verbose about operations.
|
|---|
| 460 | List filenames as they are copied in from the archive.
|
|---|
| 461 | .It Fl Z
|
|---|
| 462 | Use the
|
|---|
| 463 | .Xr compress 1
|
|---|
| 464 | utility to decompress the archive.
|
|---|
| 465 | .It Fl z
|
|---|
| 466 | Use the
|
|---|
| 467 | .Xr gzip 1
|
|---|
| 468 | utility to decompress the archive.
|
|---|
| 469 | .El
|
|---|
| 470 | .It Fl p
|
|---|
| 471 | Copy files from one location to another in a single pass.
|
|---|
| 472 | The list of files to copy are read from standard input and
|
|---|
| 473 | written out to a directory relative to the specified
|
|---|
| 474 | .Ar directory
|
|---|
| 475 | argument.
|
|---|
| 476 | .Bl -tag -width Ds
|
|---|
| 477 | .It Fl a
|
|---|
| 478 | Reset the access times on files that have been copied.
|
|---|
| 479 | .It Fl d
|
|---|
| 480 | Create any intermediate directories as needed to write
|
|---|
| 481 | the files at the new location.
|
|---|
| 482 | .It Fl L
|
|---|
| 483 | Follow symbolic links.
|
|---|
| 484 | .It Fl l
|
|---|
| 485 | When possible, link files rather than creating an
|
|---|
| 486 | extra copy.
|
|---|
| 487 | .It Fl m
|
|---|
| 488 | Restore modification times on files.
|
|---|
| 489 | .It Fl u
|
|---|
| 490 | Overwrite files even when the original file being copied is
|
|---|
| 491 | older than the one that will be overwritten.
|
|---|
| 492 | .It Fl V
|
|---|
| 493 | Print a dot
|
|---|
| 494 | .Pq Sq .\&
|
|---|
| 495 | for each file copied.
|
|---|
| 496 | .It Fl v
|
|---|
| 497 | Be verbose about operations.
|
|---|
| 498 | List filenames as they are copied.
|
|---|
| 499 | .El
|
|---|
| 500 | .El
|
|---|
| 501 | .Sh ENVIRONMENT
|
|---|
| 502 | .Bl -tag -width Fl
|
|---|
| 503 | .It Ev TMPDIR
|
|---|
| 504 | Path in which to store temporary files.
|
|---|
| 505 | .El
|
|---|
| 506 | .Sh EXIT STATUS
|
|---|
| 507 | The
|
|---|
| 508 | .Nm
|
|---|
| 509 | utility exits with one of the following values:
|
|---|
| 510 | .Pp
|
|---|
| 511 | .Bl -tag -width Ds -offset indent -compact
|
|---|
| 512 | .It 0
|
|---|
| 513 | All files were processed successfully.
|
|---|
| 514 | .It 1
|
|---|
| 515 | An error occurred.
|
|---|
| 516 | .El
|
|---|
| 517 | .Sh DIAGNOSTICS
|
|---|
| 518 | Whenever
|
|---|
| 519 | .Nm
|
|---|
| 520 | cannot create a file or a link when extracting an archive or cannot
|
|---|
| 521 | find a file while writing an archive, or cannot preserve the user
|
|---|
| 522 | ID, group ID, file mode, or access and modification times when the
|
|---|
| 523 | .Fl p
|
|---|
| 524 | option is specified, a diagnostic message is written to standard
|
|---|
| 525 | error and a non-zero exit value will be returned, but processing
|
|---|
| 526 | will continue.
|
|---|
| 527 | In the case where
|
|---|
| 528 | .Nm
|
|---|
| 529 | cannot create a link to a file,
|
|---|
| 530 | unless
|
|---|
| 531 | .Fl M Ar lncp
|
|---|
| 532 | is given,
|
|---|
| 533 | .Nm
|
|---|
| 534 | will not create a second copy of the file.
|
|---|
| 535 | .Pp
|
|---|
| 536 | If the extraction of a file from an archive is prematurely terminated
|
|---|
| 537 | by a signal or error,
|
|---|
| 538 | .Nm
|
|---|
| 539 | may have only partially extracted the file the user wanted.
|
|---|
| 540 | Additionally, the file modes of extracted files and directories may
|
|---|
| 541 | have incorrect file bits, and the modification and access times may
|
|---|
| 542 | be wrong.
|
|---|
| 543 | .Pp
|
|---|
| 544 | If the creation of an archive is prematurely terminated by a signal
|
|---|
| 545 | or error,
|
|---|
| 546 | .Nm
|
|---|
| 547 | may have only partially created the archive, which may violate the
|
|---|
| 548 | specific archive format specification.
|
|---|
| 549 | .Sh SEE ALSO
|
|---|
| 550 | .Xr ar 1 ,
|
|---|
| 551 | .if \ng==1 \{\
|
|---|
| 552 | .Xr cpio 1 ,
|
|---|
| 553 | .Xr deb 5 ,
|
|---|
| 554 | .Xr mirpax 1 ,
|
|---|
| 555 | .Xr mirtar 1 ,
|
|---|
| 556 | .\}
|
|---|
| 557 | .ie \ng==2 \{\
|
|---|
| 558 | .Xr cpio 1 ,
|
|---|
| 559 | .Xr deb 5 ,
|
|---|
| 560 | .Xr pax 1 ,
|
|---|
| 561 | .Xr paxtar 1 ,
|
|---|
| 562 | .\}
|
|---|
| 563 | .el \{\
|
|---|
| 564 | .Xr pax 1 ,
|
|---|
| 565 | .\}
|
|---|
| 566 | .Xr tar 1
|
|---|
| 567 | .Sh AUTHORS
|
|---|
| 568 | Keith Muller at the University of California, San Diego.
|
|---|
| 569 | .Pp
|
|---|
| 570 | .Mx
|
|---|
| 571 | extensions by
|
|---|
| 572 | .An Thorsten Glaser Aq tg@mirbsd.org .
|
|---|
| 573 | .Sh CAVEATS
|
|---|
| 574 | Different file formats have different maximum file sizes.
|
|---|
| 575 | It is recommended that a format such as cpio or ustar
|
|---|
| 576 | be used for larger files.
|
|---|
| 577 | .Bl -column "File format" "Maximum file size" -offset indent
|
|---|
| 578 | .It Sy "File format" Ta Sy "Maximum file size"
|
|---|
| 579 | .It ar Ta "10 Gigabytes \- 1 Byte"
|
|---|
| 580 | .It bcpio Ta "4 Gibibytes"
|
|---|
| 581 | .It sv4cpio Ta "4 Gibibytes"
|
|---|
| 582 | .It cpio Ta "8 Gibibytes"
|
|---|
| 583 | .It tar Ta "8 Gibibytes"
|
|---|
| 584 | .It ustar Ta "8 Gibibytes"
|
|---|
| 585 | .El
|
|---|
| 586 | .Pp
|
|---|
| 587 | The backwards-compatible format options are not available in the
|
|---|
| 588 | .Xr \*(np 1
|
|---|
| 589 | front-end.
|
|---|
| 590 | .Pp
|
|---|
| 591 | The
|
|---|
| 592 | .Fl M
|
|---|
| 593 | option is a MirBSD extension, available starting with
|
|---|
| 594 | .Mx 8 .
|
|---|
| 595 | Archives written using these options are, however, compatible to
|
|---|
| 596 | the standard and should be readable on any other system.
|
|---|
| 597 | The only option whose behaviour is not explicitly allowed by the
|
|---|
| 598 | standard is hard link unification (write file contens only once)
|
|---|
| 599 | selected by
|
|---|
| 600 | .Fl M Ar 0x0002 .
|
|---|
| 601 | .Pp
|
|---|
| 602 | The
|
|---|
| 603 | .Fl V
|
|---|
| 604 | option is a GNU extension, available starting with
|
|---|
| 605 | .Mx 11 .
|
|---|
| 606 | .Pp
|
|---|
| 607 | The
|
|---|
| 608 | .Ar ar
|
|---|
| 609 | file format matches APT repositories and the BSD
|
|---|
| 610 | .Xr ar 1
|
|---|
| 611 | specification, not GNU binutils (which can however read them) or SYSV systems.
|
|---|
| 612 | .Sh BUGS
|
|---|
| 613 | The
|
|---|
| 614 | .Fl s
|
|---|
| 615 | and
|
|---|
| 616 | .Fl S
|
|---|
| 617 | options are currently not implemented.
|
|---|