| 1 |
.\" $MirOS: src/bin/pax/cpio.1,v 1.15 2006/07/21 17:34:59 tg Exp $ |
.\" $MirOS: src/bin/pax/cpio.1,v 1.17 2008/03/14 17:05:06 tg Exp $ |
| 2 |
.\" $OpenBSD: cpio.1,v 1.23 2006/01/03 17:22:47 jmc Exp $ |
.\" $OpenBSD: cpio.1,v 1.26 2007/05/31 19:19:15 jmc Exp $ |
| 3 |
.\" |
.\" |
| 4 |
.\" Copyright (c) 2005 Thorsten Glaser <tg@66h.42h.de> |
.\" Copyright (c) 2005 Thorsten Glaser <tg@66h.42h.de> |
| 5 |
.\" Copyright (c) 1997 SigmaSoft, Th. Lockert |
.\" Copyright (c) 1997 SigmaSoft, Th. Lockert |
| 25 |
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 26 |
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 |
.\" |
.\" |
| 28 |
.Dd July 21, 2006 |
.\" $OpenBSD: cpio.1,v 1.26 2007/05/31 19:19:15 jmc Exp $ |
| 29 |
.Dt CPIO 1 |
.\" |
| 30 |
.Os MirBSD |
.\"- |
| 31 |
.\" for portability |
.\" Try to make GNU groff and AT&T nroff more compatible |
| 32 |
|
.\" * ` generates ‘ in groff, so use \` |
| 33 |
|
.\" * ' generates ’ in groff, \' generates ´, so use \*(aq |
| 34 |
|
.\" * - generates ‐ in groff, \- generates −, fixed in tmac/mdoc/doc-groff |
| 35 |
|
.\" thus use - for hyphens and \- for minus signs and option dashes |
| 36 |
|
.\" * ~ is size-reduced and placed atop in groff, so use \*(TI |
| 37 |
|
.\" * ^ is size-reduced and placed atop in groff, so use \*(ha |
| 38 |
|
.\" * \(en does not work in nroff, so use \*(en |
| 39 |
|
.ie \n(.g \{\ |
| 40 |
|
. ds aq \(aq |
| 41 |
|
. ds TI \(ti |
| 42 |
|
. ds ha \(ha |
| 43 |
|
. ds en \(en |
| 44 |
|
.\} |
| 45 |
|
.el \{\ |
| 46 |
|
. ds aq ' |
| 47 |
|
. ds TI ~ |
| 48 |
|
. ds ha ^ |
| 49 |
|
. ds en \(em |
| 50 |
|
.\} |
| 51 |
|
.\" |
| 52 |
|
.\" Implement .Dd with the Mdocdate RCS keyword |
| 53 |
|
.rn Dd xD |
| 54 |
|
.de Dd |
| 55 |
|
.ie \\$1$Mdocdate: \{\ |
| 56 |
|
. xD \\$2 \\$3, \\$4 |
| 57 |
|
.\} |
| 58 |
|
.el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 |
| 59 |
|
.. |
| 60 |
|
.\" |
| 61 |
|
.\" .Dd must come before definition of .Mx, because when called |
| 62 |
|
.\" with -mandoc, it might implement .Mx itself, but we want to |
| 63 |
|
.\" use our own definition. And .Dd must come *first*, always. |
| 64 |
|
.Dd $Mdocdate: March 14 2008 $ |
| 65 |
|
.\" |
| 66 |
|
.\" Implement .Mx (MirBSD) |
| 67 |
.de Mx |
.de Mx |
| 68 |
.nr cF \\n(.f |
.nr cF \\n(.f |
| 69 |
.nr cZ \\n(.s |
.nr cZ \\n(.s |
| 88 |
. \} |
. \} |
| 89 |
.\} |
.\} |
| 90 |
.. |
.. |
| 91 |
|
.Dt CPIO 1 |
| 92 |
|
.Os MirBSD |
| 93 |
.Sh NAME |
.Sh NAME |
| 94 |
.Nm cpio |
.Nm cpio |
| 95 |
.Nd copy file archives in and out |
.Nd copy file archives in and out |
| 96 |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
| 97 |
.Nm cpio |
.Nm cpio |
| 98 |
.Fl o |
.Fl o |
| 99 |
.Op Fl aABcLvzZ |
.Op Fl AaBcLvZz |
| 100 |
.Op Fl C Ar bytes |
.Op Fl C Ar bytes |
| 101 |
.Op Fl F Ar archive |
.Op Fl F Ar archive |
| 102 |
.Op Fl H Ar format |
.Op Fl H Ar format |
| 103 |
.Op Fl M Ar flag |
.Op Fl M Ar flag |
| 104 |
.Op Fl O Ar archive |
.Op Fl O Ar archive |
| 105 |
.Ar "< name-list" |
.Ar \*(Lt name-list |
| 106 |
.Op Ar "> archive" |
.Op Ar \*(Gt archive |
| 107 |
.Nm cpio |
.Nm cpio |
| 108 |
.Fl i |
.Fl i |
| 109 |
.Op Fl bBcdfmrsStuvzZ6 |
.Op Fl 6BbcdfmrSstuvZz |
| 110 |
.Op Fl C Ar bytes |
.Op Fl C Ar bytes |
| 111 |
.Op Fl E Ar file |
.Op Fl E Ar file |
| 112 |
.Op Fl F Ar archive |
.Op Fl F Ar archive |
| 113 |
.Op Fl H Ar format |
.Op Fl H Ar format |
| 114 |
.Op Fl I Ar archive |
.Op Fl I Ar archive |
| 115 |
.Op Ar "pattern ..." |
.Op Ar pattern ... |
| 116 |
.Op Ar "< archive" |
.Op Ar \*(Lt archive |
| 117 |
.Nm cpio |
.Nm cpio |
| 118 |
.Fl p |
.Fl p |
| 119 |
.Op Fl adlLmuv |
.Op Fl adLlmuv |
| 120 |
.Ar destination-directory |
.Ar destination-directory |
| 121 |
.Ar "< name-list" |
.Ar \*(Lt name-list |
| 122 |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
| 123 |
The |
The |
| 124 |
.Nm |
.Nm |
| 134 |
archive from standard input, and writes the archive on standard |
archive from standard input, and writes the archive on standard |
| 135 |
output. |
output. |
| 136 |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
| 137 |
|
.It Fl A |
| 138 |
|
Append to the specified archive. |
| 139 |
.It Fl a |
.It Fl a |
| 140 |
Reset the access times on files that have been copied to the |
Reset the access times on files that have been copied to the |
| 141 |
archive. |
archive. |
|
.It Fl A |
|
|
Append to the specified archive. |
|
| 142 |
.It Fl B |
.It Fl B |
| 143 |
Set block size of output to 5120 bytes. |
Set block size of output to 5120 bytes. |
| 144 |
|
.It Fl C Ar bytes |
| 145 |
|
Set the block size of output to |
| 146 |
|
.Ar bytes . |
| 147 |
.It Fl c |
.It Fl c |
| 148 |
Use ASCII format for |
Use ASCII format for |
| 149 |
.Nm |
.Nm |
| 150 |
header for portability. |
header for portability. |
|
.It Fl C Ar bytes |
|
|
Set the block size of output to |
|
|
.Ar bytes . |
|
| 151 |
.It Fl F Ar archive |
.It Fl F Ar archive |
| 152 |
.It Fl O Ar archive |
Use the specified file as the input for the archive. |
|
Use the specified file name as the archive to write to. |
|
| 153 |
.It Fl H Ar format |
.It Fl H Ar format |
| 154 |
Write the archive in the specified format. |
Write the archive in the specified format. |
| 155 |
Recognised formats are: |
Recognised formats are: |
| 232 |
and |
and |
| 233 |
.Ar links |
.Ar links |
| 234 |
specifiers are ignored. |
specifiers are ignored. |
| 235 |
|
.It Fl O Ar archive |
| 236 |
|
Use the specified file name as the archive to write to. |
| 237 |
.It Fl v |
.It Fl v |
| 238 |
Be verbose about operations. |
Be verbose about operations. |
| 239 |
List filenames as they are written to the archive. |
List filenames as they are written to the archive. |
|
.It Fl z |
|
|
Compress archive using |
|
|
.Xr gzip 1 |
|
|
format. |
|
| 240 |
.It Fl Z |
.It Fl Z |
| 241 |
Compress archive using |
Compress archive using |
| 242 |
.Xr compress 1 |
.Xr compress 1 |
| 243 |
format. |
format. |
| 244 |
|
.It Fl z |
| 245 |
|
Compress archive using |
| 246 |
|
.Xr gzip 1 |
| 247 |
|
format. |
| 248 |
.El |
.El |
| 249 |
.It Fl i |
.It Fl i |
| 250 |
Restore files from an archive. |
Restore files from an archive. |
| 253 |
.Ar patterns |
.Ar patterns |
| 254 |
that were specified on the command line. |
that were specified on the command line. |
| 255 |
.Bl -tag -width Ds |
.Bl -tag -width Ds |
| 256 |
|
.It Fl 6 |
| 257 |
|
Process old-style |
| 258 |
|
.Nm |
| 259 |
|
format archives. |
| 260 |
|
.It Fl B |
| 261 |
|
Set the block size of the archive being read to 5120 bytes. |
| 262 |
.It Fl b |
.It Fl b |
| 263 |
Do byte and word swapping after reading in data from the |
Do byte and word swapping after reading in data from the |
| 264 |
archive, for restoring archives created on systems with |
archive, for restoring archives created on systems with |
| 265 |
a different byte order. |
a different byte order. |
|
.It Fl B |
|
|
Set the block size of the archive being read to 5120 bytes. |
|
|
.It Fl c |
|
|
Expect the archive headers to be in ASCII format. |
|
| 266 |
.It Fl C Ar bytes |
.It Fl C Ar bytes |
| 267 |
Read archive written with a block size of |
Read archive written with a block size of |
| 268 |
.Ar bytes . |
.Ar bytes . |
| 269 |
|
.It Fl c |
| 270 |
|
Expect the archive headers to be in ASCII format. |
| 271 |
.It Fl d |
.It Fl d |
| 272 |
Create any intermediate directories as needed during |
Create any intermediate directories as needed during |
| 273 |
restore. |
restore. |
| 274 |
.It Fl E Ar file |
.It Fl E Ar file |
| 275 |
Read list of file name patterns to extract or list from |
Read list of file name patterns to extract or list from |
| 276 |
.Ar file . |
.Ar file . |
| 277 |
|
.It Fl F Ar archive , Fl I Ar archive |
| 278 |
|
Use the specified file as the input for the archive. |
| 279 |
.It Fl f |
.It Fl f |
| 280 |
Restore all files except those matching the |
Restore all files except those matching the |
| 281 |
.Ar patterns |
.Ar patterns |
| 282 |
given on the command line. |
given on the command line. |
|
.It Fl F Ar archive |
|
|
.It Fl I Ar archive |
|
|
Use the specified file as the input for the archive. |
|
| 283 |
.It Fl H Ar format |
.It Fl H Ar format |
| 284 |
Read an archive of the specified format. |
Read an archive of the specified format. |
| 285 |
Recognised formats are: |
Recognised formats are: |
| 319 |
Restore modification times on files. |
Restore modification times on files. |
| 320 |
.It Fl r |
.It Fl r |
| 321 |
Rename restored files interactively. |
Rename restored files interactively. |
|
.It Fl s |
|
|
Swap bytes after reading data from the archive. |
|
| 322 |
.It Fl S |
.It Fl S |
| 323 |
Swap words after reading data from the archive. |
Swap words after reading data from the archive. |
| 324 |
|
.It Fl s |
| 325 |
|
Swap bytes after reading data from the archive. |
| 326 |
.It Fl t |
.It Fl t |
| 327 |
Only list the contents of the archive, no files or |
Only list the contents of the archive, no files or |
| 328 |
directories will be created. |
directories will be created. |
| 332 |
.It Fl v |
.It Fl v |
| 333 |
Be verbose about operations. |
Be verbose about operations. |
| 334 |
List filenames as they are copied in from the archive. |
List filenames as they are copied in from the archive. |
|
.It Fl z |
|
|
Uncompress archive using |
|
|
.Xr gzip 1 |
|
|
format. |
|
| 335 |
.It Fl Z |
.It Fl Z |
| 336 |
Uncompress archive using |
Uncompress archive using |
| 337 |
.Xr compress 1 |
.Xr compress 1 |
| 338 |
format. |
format. |
| 339 |
.It Fl 6 |
.It Fl z |
| 340 |
Process old-style |
Uncompress archive using |
| 341 |
.Nm |
.Xr gzip 1 |
| 342 |
format archives. |
format. |
| 343 |
.El |
.El |
| 344 |
.It Fl p |
.It Fl p |
| 345 |
Copy files from one location to another in a single pass. |
Copy files from one location to another in a single pass. |
| 353 |
.It Fl d |
.It Fl d |
| 354 |
Create any intermediate directories as needed to write |
Create any intermediate directories as needed to write |
| 355 |
the files at the new location. |
the files at the new location. |
| 356 |
|
.It Fl L |
| 357 |
|
Follow symbolic links. |
| 358 |
.It Fl l |
.It Fl l |
| 359 |
When possible, link files rather than creating an |
When possible, link files rather than creating an |
| 360 |
extra copy. |
extra copy. |
|
.It Fl L |
|
|
Follow symbolic links. |
|
| 361 |
.It Fl m |
.It Fl m |
| 362 |
Restore modification times on files. |
Restore modification times on files. |
| 363 |
.It Fl u |
.It Fl u |