| 1 | .\" $MirOS: src/bin/pax/tar.1,v 1.11 2009/10/27 18:47:27 tg Exp $
|
|---|
| 2 | .\" $OpenBSD: tar.1,v 1.48 2007/05/31 19:19:15 jmc Exp $
|
|---|
| 3 | .\"
|
|---|
| 4 | .\" Copyright (c) 1996 SigmaSoft, Th. Lockert
|
|---|
| 5 | .\" All rights reserved.
|
|---|
| 6 | .\"
|
|---|
| 7 | .\" Redistribution and use in source and binary forms, with or without
|
|---|
| 8 | .\" modification, are permitted provided that the following conditions
|
|---|
| 9 | .\" are met:
|
|---|
| 10 | .\" 1. Redistributions of source code must retain the above copyright
|
|---|
| 11 | .\" notice, this list of conditions and the following disclaimer.
|
|---|
| 12 | .\" 2. Redistributions in binary form must reproduce the above copyright
|
|---|
| 13 | .\" notice, this list of conditions and the following disclaimer in the
|
|---|
| 14 | .\" documentation and/or other materials provided with the distribution.
|
|---|
| 15 | .\"
|
|---|
| 16 | .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|---|
| 17 | .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|---|
| 18 | .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|---|
| 19 | .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|---|
| 20 | .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|---|
| 21 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|---|
| 22 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|---|
| 23 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|---|
| 24 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|---|
| 25 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|---|
| 26 | .\"
|
|---|
| 27 | .\" $OpenBSD: tar.1,v 1.48 2007/05/31 19:19:15 jmc Exp $
|
|---|
| 28 | .\"
|
|---|
| 29 | .\"-
|
|---|
| 30 | .\" Try to make GNU groff and AT&T nroff more compatible
|
|---|
| 31 | .\" * ` generates ‘ in groff, so use \`
|
|---|
| 32 | .\" * ' generates ’ in groff, \' generates ´, so use \*(aq
|
|---|
| 33 | .\" * - generates ‐ in groff, \- generates −, fixed in tmac/mdoc/doc-groff
|
|---|
| 34 | .\" thus use - for hyphens and \- for minus signs and option dashes
|
|---|
| 35 | .\" * ~ is size-reduced and placed atop in groff, so use \*(TI
|
|---|
| 36 | .\" * ^ is size-reduced and placed atop in groff, so use \*(ha
|
|---|
| 37 | .\" * \(en does not work in nroff, so use \*(en
|
|---|
| 38 | .ie \n(.g \{\
|
|---|
| 39 | . ds aq \(aq
|
|---|
| 40 | . ds TI \(ti
|
|---|
| 41 | . ds ha \(ha
|
|---|
| 42 | . ds en \(en
|
|---|
| 43 | .\}
|
|---|
| 44 | .el \{\
|
|---|
| 45 | . ds aq '
|
|---|
| 46 | . ds TI ~
|
|---|
| 47 | . ds ha ^
|
|---|
| 48 | . ds en \(em
|
|---|
| 49 | .\}
|
|---|
| 50 | .\"
|
|---|
| 51 | .\" Implement .Dd with the Mdocdate RCS keyword
|
|---|
| 52 | .rn Dd xD
|
|---|
| 53 | .de Dd
|
|---|
| 54 | .ie \\$1$Mdocdate: \{\
|
|---|
| 55 | . xD \\$2 \\$3, \\$4
|
|---|
| 56 | .\}
|
|---|
| 57 | .el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8
|
|---|
| 58 | ..
|
|---|
| 59 | .\"
|
|---|
| 60 | .\" .Dd must come before definition of .Mx, because when called
|
|---|
| 61 | .\" with -mandoc, it might implement .Mx itself, but we want to
|
|---|
| 62 | .\" use our own definition. And .Dd must come *first*, always.
|
|---|
| 63 | .Dd $Mdocdate: October 27 2009 $
|
|---|
| 64 | .\"
|
|---|
| 65 | .\" Implement .Mx (MirBSD)
|
|---|
| 66 | .de Mx
|
|---|
| 67 | .nr cF \\n(.f
|
|---|
| 68 | .nr cZ \\n(.s
|
|---|
| 69 | .ds aa \&\f\\n(cF\s\\n(cZ
|
|---|
| 70 | .if \\n(aC==0 \{\
|
|---|
| 71 | . ie \\n(.$==0 \&MirOS\\*(aa
|
|---|
| 72 | . el .aV \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
|
|---|
| 73 | .\}
|
|---|
| 74 | .if \\n(aC>\\n(aP \{\
|
|---|
| 75 | . nr aP \\n(aP+1
|
|---|
| 76 | . ie \\n(C\\n(aP==2 \{\
|
|---|
| 77 | . as b1 \&MirOS\ #\&\\*(A\\n(aP\\*(aa
|
|---|
| 78 | . ie \\n(aC>\\n(aP \{\
|
|---|
| 79 | . nr aP \\n(aP+1
|
|---|
| 80 | . nR
|
|---|
| 81 | . \}
|
|---|
| 82 | . el .aZ
|
|---|
| 83 | . \}
|
|---|
| 84 | . el \{\
|
|---|
| 85 | . as b1 \&MirOS\\*(aa
|
|---|
| 86 | . nR
|
|---|
| 87 | . \}
|
|---|
| 88 | .\}
|
|---|
| 89 | ..
|
|---|
| 90 | .Dt TAR 1
|
|---|
| 91 | .Os MirBSD
|
|---|
| 92 | .Sh NAME
|
|---|
| 93 | .Nm tar
|
|---|
| 94 | .Nd tape archiver
|
|---|
| 95 | .Sh SYNOPSIS
|
|---|
| 96 | .Nm tar
|
|---|
| 97 | .Sm off
|
|---|
| 98 | .No { Cm crtux No } Op Cm 014578befHhLmOoPRSpqsvwXZz
|
|---|
| 99 | .Sm on
|
|---|
| 100 | .Bk -words
|
|---|
| 101 | .Op Ar blocking-factor | archive | replstr
|
|---|
| 102 | .Op Fl C Ar directory
|
|---|
| 103 | .Op Fl I Ar file
|
|---|
| 104 | .Op Ar file ...
|
|---|
| 105 | .Ek
|
|---|
| 106 | .Pp
|
|---|
| 107 | .Nm tar
|
|---|
| 108 | .No { Ns Fl crtux Ns }
|
|---|
| 109 | .Op Fl 014578eHhLmOoPpqRSvwXZz
|
|---|
| 110 | .Op Fl b Ar blocking-factor
|
|---|
| 111 | .Op Fl C Ar directory
|
|---|
| 112 | .Op Fl f Ar archive
|
|---|
| 113 | .Op Fl I Ar file
|
|---|
| 114 | .Op Fl M Ar flag
|
|---|
| 115 | .Op Fl s Ar replstr
|
|---|
| 116 | .Op Ar file ...
|
|---|
| 117 | .Sh DESCRIPTION
|
|---|
| 118 | The
|
|---|
| 119 | .Nm
|
|---|
| 120 | command creates, adds files to, or extracts files from an
|
|---|
| 121 | archive file in
|
|---|
| 122 | .Dq tar
|
|---|
| 123 | format.
|
|---|
| 124 | A tar archive is often stored on a magnetic tape, but can be
|
|---|
| 125 | stored equally well on a floppy, CD-ROM, or in a regular disk file.
|
|---|
| 126 | .Pp
|
|---|
| 127 | In the first (legacy) form, all option flags except for
|
|---|
| 128 | .Fl C
|
|---|
| 129 | and
|
|---|
| 130 | .Fl I
|
|---|
| 131 | must be contained within the first argument to
|
|---|
| 132 | .Nm
|
|---|
| 133 | and must not be prefixed by a hyphen
|
|---|
| 134 | .Pq Sq - .
|
|---|
| 135 | Option arguments, if any, are processed as subsequent arguments to
|
|---|
| 136 | .Nm
|
|---|
| 137 | and are processed in the order in which their corresponding option
|
|---|
| 138 | flags have been presented on the command line.
|
|---|
| 139 | .Pp
|
|---|
| 140 | In the second and preferred form, option flags may be given in any order
|
|---|
| 141 | and are immediately followed by their corresponding option argument
|
|---|
| 142 | values.
|
|---|
| 143 | .Pp
|
|---|
| 144 | One of the following flags must be present:
|
|---|
| 145 | .Bl -tag -width Ds
|
|---|
| 146 | .It Fl c
|
|---|
| 147 | Create new archive, or overwrite an existing archive,
|
|---|
| 148 | adding the specified files to it.
|
|---|
| 149 | .It Fl r
|
|---|
| 150 | Append the named new files to existing archive.
|
|---|
| 151 | Note that this will only work on media on which an end-of-file mark
|
|---|
| 152 | can be overwritten.
|
|---|
| 153 | .It Fl t
|
|---|
| 154 | List contents of archive.
|
|---|
| 155 | If any files are named on the
|
|---|
| 156 | command line, only those files will be listed.
|
|---|
| 157 | The
|
|---|
| 158 | .Ar file
|
|---|
| 159 | arguments may be specified as glob patterns (see
|
|---|
| 160 | .Xr glob 3
|
|---|
| 161 | for more information), in which case
|
|---|
| 162 | .Nm
|
|---|
| 163 | will list all archive members that match each pattern.
|
|---|
| 164 | .It Fl u
|
|---|
| 165 | Alias for
|
|---|
| 166 | .Fl r .
|
|---|
| 167 | .It Fl x
|
|---|
| 168 | Extract files from archive.
|
|---|
| 169 | If any files are named on the
|
|---|
| 170 | command line, only those files will be extracted from the
|
|---|
| 171 | archive.
|
|---|
| 172 | The
|
|---|
| 173 | .Ar file
|
|---|
| 174 | arguments may be specified as glob patterns (see
|
|---|
| 175 | .Xr glob 3
|
|---|
| 176 | for more information), in which case
|
|---|
| 177 | .Nm
|
|---|
| 178 | will extract all archive members that match each pattern.
|
|---|
| 179 | .Pp
|
|---|
| 180 | If more than one copy of a file exists in the
|
|---|
| 181 | archive, later copies will overwrite earlier copies during
|
|---|
| 182 | extraction.
|
|---|
| 183 | The file mode and modification time are preserved
|
|---|
| 184 | if possible.
|
|---|
| 185 | The file mode is subject to modification by the
|
|---|
| 186 | .Xr umask 2 .
|
|---|
| 187 | .El
|
|---|
| 188 | .Pp
|
|---|
| 189 | In addition to the flags mentioned above, any of the following
|
|---|
| 190 | flags may be used:
|
|---|
| 191 | .Bl -tag -width Ds
|
|---|
| 192 | .It Fl b Ar blocking-factor
|
|---|
| 193 | Set blocking factor to use for the archive.
|
|---|
| 194 | .Nm
|
|---|
| 195 | uses 512-byte blocks.
|
|---|
| 196 | The default is 20, the maximum is 126.
|
|---|
| 197 | Archives with a blocking factor larger than 63 violate the
|
|---|
| 198 | .Tn POSIX
|
|---|
| 199 | standard and will not be portable to all systems.
|
|---|
| 200 | .It Fl C Ar directory
|
|---|
| 201 | This is a positional argument which sets the working directory for the
|
|---|
| 202 | following files.
|
|---|
| 203 | When extracting, files will be extracted into
|
|---|
| 204 | the specified directory; when creating, the specified files will be matched
|
|---|
| 205 | from the directory.
|
|---|
| 206 | .It Fl e
|
|---|
| 207 | Stop after the first error.
|
|---|
| 208 | .It Fl f Ar archive
|
|---|
| 209 | Filename where the archive is stored.
|
|---|
| 210 | Defaults to
|
|---|
| 211 | .Pa /dev/rst0 .
|
|---|
| 212 | .It Fl H
|
|---|
| 213 | Follow symlinks given on the command line only.
|
|---|
| 214 | .It Fl h
|
|---|
| 215 | Follow symbolic links as if they were normal files
|
|---|
| 216 | or directories.
|
|---|
| 217 | In extract mode this means that a directory entry in the archive
|
|---|
| 218 | will not overwrite an existing symbolic link, but rather what the
|
|---|
| 219 | link ultimately points to.
|
|---|
| 220 | .It Fl I Ar file
|
|---|
| 221 | This is a positional argument which reads the names of files to
|
|---|
| 222 | archive or extract from the given file, one per line.
|
|---|
| 223 | .It Fl L
|
|---|
| 224 | Synonym for the
|
|---|
| 225 | .Fl h
|
|---|
| 226 | option.
|
|---|
| 227 | .It Fl M Ar flag
|
|---|
| 228 | Configure the archive normaliser.
|
|---|
| 229 | .Ar flag
|
|---|
| 230 | is either a number or a string, optionally prefixed with
|
|---|
| 231 | .Dq no-
|
|---|
| 232 | to turn it off.
|
|---|
| 233 | See
|
|---|
| 234 | .Xr cpio 1
|
|---|
| 235 | for a comprehensive list and compatibility notes.
|
|---|
| 236 | .Pp
|
|---|
| 237 | .Bl -tag -width xxxxxx -compact
|
|---|
| 238 | .It Ar inodes
|
|---|
| 239 | 0x0001: Serialise inodes, zero device info.
|
|---|
| 240 | .It Ar links
|
|---|
| 241 | 0x0002: Store content of hard links only once.
|
|---|
| 242 | .It Ar mtime
|
|---|
| 243 | 0x0004: Zero out the file modification time.
|
|---|
| 244 | .It Ar uidgid
|
|---|
| 245 | 0x0008: Set owner to 0:0 (root:wheel).
|
|---|
| 246 | .It Ar lncp
|
|---|
| 247 | 0x0040: Extract hard links by copying if linking fails.
|
|---|
| 248 | .El
|
|---|
| 249 | .Pp
|
|---|
| 250 | This option is only implemented for the cpio, sv4cpio,
|
|---|
| 251 | sv4crc, and ustar file format writing routines.
|
|---|
| 252 | For the ustar format, the
|
|---|
| 253 | .Ar inodes
|
|---|
| 254 | and
|
|---|
| 255 | .Ar links
|
|---|
| 256 | specifiers are ignored.
|
|---|
| 257 | .It Fl m
|
|---|
| 258 | Do not preserve modification time.
|
|---|
| 259 | .It Fl O
|
|---|
| 260 | If reading, extract files to standard output.
|
|---|
| 261 | .br
|
|---|
| 262 | If writing, write old-style (non-POSIX) archives.
|
|---|
| 263 | .It Fl o
|
|---|
| 264 | Don't write directory information that the older (V7) style
|
|---|
| 265 | .Nm
|
|---|
| 266 | is unable to decode.
|
|---|
| 267 | This implies the
|
|---|
| 268 | .Fl O
|
|---|
| 269 | flag.
|
|---|
| 270 | .It Fl P
|
|---|
| 271 | Do not strip leading slashes
|
|---|
| 272 | .Pq Sq /
|
|---|
| 273 | from pathnames.
|
|---|
| 274 | The default is to strip leading slashes.
|
|---|
| 275 | .It Fl p
|
|---|
| 276 | Preserve user and group ID as well as file mode regardless of
|
|---|
| 277 | the current
|
|---|
| 278 | .Xr umask 2 .
|
|---|
| 279 | The setuid and setgid bits are only preserved if the user is
|
|---|
| 280 | the superuser.
|
|---|
| 281 | Only meaningful in conjunction with the
|
|---|
| 282 | .Fl x
|
|---|
| 283 | flag.
|
|---|
| 284 | .It Fl q
|
|---|
| 285 | Select the first archive member that matches each
|
|---|
| 286 | .Ar file
|
|---|
| 287 | operand.
|
|---|
| 288 | No more than one archive member is matched for each
|
|---|
| 289 | .Ar file .
|
|---|
| 290 | When members of type directory are matched, the file hierarchy rooted at that
|
|---|
| 291 | directory is also matched.
|
|---|
| 292 | .It Fl R
|
|---|
| 293 | Write SysVR4 CPIO files instead of tar or POSIX ustar files.
|
|---|
| 294 | Serialise inode numbers, zero out device information.
|
|---|
| 295 | The file content of hard links is stored only once.
|
|---|
| 296 | .It Fl S
|
|---|
| 297 | Write SysVR4 CPIO files with CRC instead of tar or POSIX ustar files.
|
|---|
| 298 | Serialise inode numbers, zero out device information.
|
|---|
| 299 | The file content of hard links is stored only once.
|
|---|
| 300 | .It Fl s Ar replstr
|
|---|
| 301 | Modify the archive member names according to the substitution expression
|
|---|
| 302 | .Ar replstr ,
|
|---|
| 303 | using the syntax of the
|
|---|
| 304 | .Xr ed 1
|
|---|
| 305 | utility regular expressions.
|
|---|
| 306 | .Ar file
|
|---|
| 307 | arguments may be given to restrict the list of archive members to those
|
|---|
| 308 | specified.
|
|---|
| 309 | .Pp
|
|---|
| 310 | The format of these regular expressions is
|
|---|
| 311 | .Pp
|
|---|
| 312 | .Dl /old/new/[gp]
|
|---|
| 313 | .Pp
|
|---|
| 314 | As in
|
|---|
| 315 | .Xr ed 1 ,
|
|---|
| 316 | .Va old
|
|---|
| 317 | is a basic regular expression (see
|
|---|
| 318 | .Xr re_format 7 )
|
|---|
| 319 | and
|
|---|
| 320 | .Va new
|
|---|
| 321 | can contain an ampersand
|
|---|
| 322 | .Pq Ql & ,
|
|---|
| 323 | .Ql \e Ns Em n
|
|---|
| 324 | (where
|
|---|
| 325 | .Em n
|
|---|
| 326 | is a digit) back-references,
|
|---|
| 327 | or subexpression matching.
|
|---|
| 328 | The
|
|---|
| 329 | .Va old
|
|---|
| 330 | string may also contain newline characters.
|
|---|
| 331 | Any non-null character can be used as a delimiter
|
|---|
| 332 | .Po
|
|---|
| 333 | .Ql /
|
|---|
| 334 | is shown here
|
|---|
| 335 | .Pc .
|
|---|
| 336 | Multiple
|
|---|
| 337 | .Fl s
|
|---|
| 338 | expressions can be specified.
|
|---|
| 339 | The expressions are applied in the order they are specified on the
|
|---|
| 340 | command line, terminating with the first successful substitution.
|
|---|
| 341 | .Pp
|
|---|
| 342 | The optional trailing
|
|---|
| 343 | .Cm g
|
|---|
| 344 | continues to apply the substitution expression to the pathname substring,
|
|---|
| 345 | which starts with the first character following the end of the last successful
|
|---|
| 346 | substitution.
|
|---|
| 347 | The first unsuccessful substitution stops the operation of the
|
|---|
| 348 | .Cm g
|
|---|
| 349 | option.
|
|---|
| 350 | The optional trailing
|
|---|
| 351 | .Cm p
|
|---|
| 352 | will cause the final result of a successful substitution to be written to
|
|---|
| 353 | standard error in the following format:
|
|---|
| 354 | .Pp
|
|---|
| 355 | .D1 Em original-pathname No >> Em new-pathname
|
|---|
| 356 | .Pp
|
|---|
| 357 | File or archive member names that substitute to the empty string
|
|---|
| 358 | are not selected and will be skipped.
|
|---|
| 359 | .It Fl v
|
|---|
| 360 | Verbose operation mode.
|
|---|
| 361 | .It Fl w
|
|---|
| 362 | Interactively rename files.
|
|---|
| 363 | This option causes
|
|---|
| 364 | .Nm
|
|---|
| 365 | to prompt the user for the filename to use when storing or
|
|---|
| 366 | extracting files in an archive.
|
|---|
| 367 | .It Fl X
|
|---|
| 368 | Do not cross mount points in the file system.
|
|---|
| 369 | .It Fl Z
|
|---|
| 370 | Compress archive using
|
|---|
| 371 | .Xr compress 1 .
|
|---|
| 372 | .It Fl z
|
|---|
| 373 | Compress archive using
|
|---|
| 374 | .Xr gzip 1 .
|
|---|
| 375 | .El
|
|---|
| 376 | .Pp
|
|---|
| 377 | The options
|
|---|
| 378 | .Op Fl 014578
|
|---|
| 379 | can be used to select one of the compiled-in backup devices,
|
|---|
| 380 | .Pa /dev/rstN .
|
|---|
| 381 | .Sh ENVIRONMENT
|
|---|
| 382 | .Bl -tag -width Fl
|
|---|
| 383 | .It Ev TMPDIR
|
|---|
| 384 | Path in which to store temporary files.
|
|---|
| 385 | .It Ev TAPE
|
|---|
| 386 | Default tape device to use instead of
|
|---|
| 387 | .Pa /dev/rst0 .
|
|---|
| 388 | .El
|
|---|
| 389 | .Sh FILES
|
|---|
| 390 | .Bl -tag -width "/dev/rst0"
|
|---|
| 391 | .It Pa /dev/rst0
|
|---|
| 392 | default archive name
|
|---|
| 393 | .El
|
|---|
| 394 | .Sh EXAMPLES
|
|---|
| 395 | Create an archive on the default tape drive, containing the files named
|
|---|
| 396 | .Pa bonvole
|
|---|
| 397 | and
|
|---|
| 398 | .Pa sekve :
|
|---|
| 399 | .Pp
|
|---|
| 400 | .Dl $ tar c bonvole sekve
|
|---|
| 401 | .Pp
|
|---|
| 402 | Output a
|
|---|
| 403 | .Xr gzip 1
|
|---|
| 404 | compressed archive containing the files
|
|---|
| 405 | .Pa bonvole
|
|---|
| 406 | and
|
|---|
| 407 | .Pa sekve
|
|---|
| 408 | to a file called
|
|---|
| 409 | .Pa foriru.tar.gz :
|
|---|
| 410 | .Pp
|
|---|
| 411 | .Dl $ tar zcf foriru.tar.gz bonvole sekve
|
|---|
| 412 | .Pp
|
|---|
| 413 | Verbosely create an archive, called
|
|---|
| 414 | .Pa backup.tar.gz ,
|
|---|
| 415 | of all files matching the shell
|
|---|
| 416 | .Xr glob 3
|
|---|
| 417 | function
|
|---|
| 418 | .Pa *.c :
|
|---|
| 419 | .Pp
|
|---|
| 420 | .Dl $ tar zcvf backup.tar.gz *.c
|
|---|
| 421 | .Pp
|
|---|
| 422 | Verbosely list, but do not extract, all files ending in
|
|---|
| 423 | .Pa .jpeg
|
|---|
| 424 | from a compressed archive named
|
|---|
| 425 | .Pa backup.tar.gz .
|
|---|
| 426 | Note that the glob pattern has been quoted to avoid expansion by the shell:
|
|---|
| 427 | .Pp
|
|---|
| 428 | .Dl $ tar tvzf backup.tar.gz '*.jpeg'
|
|---|
| 429 | .Pp
|
|---|
| 430 | For more detailed examples, see
|
|---|
| 431 | .Xr pax 1 .
|
|---|
| 432 | .Sh DIAGNOSTICS
|
|---|
| 433 | .Nm
|
|---|
| 434 | will exit with one of the following values:
|
|---|
| 435 | .Bl -tag -width 2n -offset indent
|
|---|
| 436 | .It 0
|
|---|
| 437 | All files were processed successfully.
|
|---|
| 438 | .It 1
|
|---|
| 439 | An error occurred.
|
|---|
| 440 | .El
|
|---|
| 441 | .Pp
|
|---|
| 442 | Whenever
|
|---|
| 443 | .Nm
|
|---|
| 444 | cannot create a file or a link when extracting an archive or cannot
|
|---|
| 445 | find a file while writing an archive, or cannot preserve the user
|
|---|
| 446 | ID, group ID, file mode, or access and modification times when the
|
|---|
| 447 | .Fl p
|
|---|
| 448 | option is specified, a diagnostic message is written to standard
|
|---|
| 449 | error and a non-zero exit value will be returned, but processing
|
|---|
| 450 | will continue.
|
|---|
| 451 | In the case where
|
|---|
| 452 | .Nm
|
|---|
| 453 | cannot create a link to a file,
|
|---|
| 454 | unless
|
|---|
| 455 | .Fl M Ar lncp
|
|---|
| 456 | is given,
|
|---|
| 457 | .Nm
|
|---|
| 458 | will not create a second copy of the file.
|
|---|
| 459 | .Pp
|
|---|
| 460 | If the extraction of a file from an archive is prematurely terminated
|
|---|
| 461 | by a signal or error,
|
|---|
| 462 | .Nm
|
|---|
| 463 | may have only partially extracted the file the user wanted.
|
|---|
| 464 | Additionally, the file modes of extracted files and directories may
|
|---|
| 465 | have incorrect file bits, and the modification and access times may
|
|---|
| 466 | be wrong.
|
|---|
| 467 | .Pp
|
|---|
| 468 | If the creation of an archive is prematurely terminated by a signal
|
|---|
| 469 | or error,
|
|---|
| 470 | .Nm
|
|---|
| 471 | may have only partially created the archive, which may violate the
|
|---|
| 472 | specific archive format specification.
|
|---|
| 473 | .Sh SEE ALSO
|
|---|
| 474 | .Xr cpio 1 ,
|
|---|
| 475 | .Xr pax 1
|
|---|
| 476 | .Sh HISTORY
|
|---|
| 477 | A
|
|---|
| 478 | .Nm
|
|---|
| 479 | command first appeared in
|
|---|
| 480 | .At v7 .
|
|---|
| 481 | .Sh AUTHORS
|
|---|
| 482 | Keith Muller at the University of California, San Diego.
|
|---|
| 483 | .Sh CAVEATS
|
|---|
| 484 | The
|
|---|
| 485 | .Fl L
|
|---|
| 486 | flag is not portable to other versions of
|
|---|
| 487 | .Nm
|
|---|
| 488 | where it may have a different meaning.
|
|---|
| 489 | The
|
|---|
| 490 | .Fl R ,
|
|---|
| 491 | .Fl S ,
|
|---|
| 492 | and
|
|---|
| 493 | .Fl M
|
|---|
| 494 | options are extensions specific to
|
|---|
| 495 | .Mx .
|
|---|