| 1 | \input texinfo @c -*-texinfo-*-
|
|---|
| 2 | @c %**start of header
|
|---|
| 3 | @setfilename cpio.info
|
|---|
| 4 | @settitle cpio
|
|---|
| 5 | @setchapternewpage off
|
|---|
| 6 | @c %**end of header
|
|---|
| 7 |
|
|---|
| 8 | @dircategory Archiving
|
|---|
| 9 | @direntry
|
|---|
| 10 | * Cpio: (cpio). Copy-in-copy-out archiver to tape or disk.
|
|---|
| 11 | @end direntry
|
|---|
| 12 |
|
|---|
| 13 | @include version.texi
|
|---|
| 14 |
|
|---|
| 15 | @copying
|
|---|
| 16 | This manual documents GNU cpio (version @value{VERSION}, @value{UPDATED}).
|
|---|
| 17 |
|
|---|
| 18 | Copyright @copyright{} 1995, 2001, 2002, 2004 Free Software Foundation, Inc.
|
|---|
| 19 | @sp 1
|
|---|
| 20 | @quotation
|
|---|
| 21 | Permission is granted to copy, distribute and/or modify this document
|
|---|
| 22 | under the terms of the GNU Free Documentation License, Version 1.2 or
|
|---|
| 23 | any later version published by the Free Software Foundation; with no
|
|---|
| 24 | Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
|
|---|
| 25 | and with the Back-Cover Texts as in (a) below. A copy of the license
|
|---|
| 26 | is included in the section entitled ``GNU Free Documentation License''.
|
|---|
| 27 |
|
|---|
| 28 | (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
|
|---|
| 29 | this GNU Manual, like GNU software. Copies published by the Free
|
|---|
| 30 | Software Foundation raise funds for GNU development.''
|
|---|
| 31 | @end quotation
|
|---|
| 32 | @end copying
|
|---|
| 33 |
|
|---|
| 34 | @titlepage
|
|---|
| 35 | @title GNU CPIO
|
|---|
| 36 | @subtitle @value{VERSION} @value{UPDATED}
|
|---|
| 37 | @author by Robert Carleton
|
|---|
| 38 | @c copyright page
|
|---|
| 39 | @page
|
|---|
| 40 | @vskip 0pt plus 1filll
|
|---|
| 41 | @insertcopying
|
|---|
| 42 | @sp 2
|
|---|
| 43 | Published by the Free Software Foundation @*
|
|---|
| 44 | 51 Franklin Street, Fifth Floor, @*
|
|---|
| 45 | Boston, MA 02110-1301, USA @*
|
|---|
| 46 | @end titlepage
|
|---|
| 47 |
|
|---|
| 48 | @node Top, Introduction, (dir), (dir)
|
|---|
| 49 | @comment node-name, next, previous, up
|
|---|
| 50 |
|
|---|
| 51 | @ifinfo
|
|---|
| 52 | @top
|
|---|
| 53 |
|
|---|
| 54 | GNU cpio is a tool for creating and extracting archives, or copying
|
|---|
| 55 | files from one place to another. It handles a number of cpio formats as
|
|---|
| 56 | well as reading and writing tar files. This is the first edition of the
|
|---|
| 57 | GNU cpio documentation and is consistant with @value{VERSION}.
|
|---|
| 58 |
|
|---|
| 59 | @end ifinfo
|
|---|
| 60 |
|
|---|
| 61 | @menu
|
|---|
| 62 | * Introduction::
|
|---|
| 63 | * Tutorial:: Getting started.
|
|---|
| 64 | * Invoking `cpio':: How to invoke `cpio'.
|
|---|
| 65 | * Media:: Using tapes and other archive media.
|
|---|
| 66 | * Reports:: Reporting bugs or suggestions
|
|---|
| 67 | * Concept Index:: Concept index.
|
|---|
| 68 |
|
|---|
| 69 | @detailmenu
|
|---|
| 70 | --- The Detailed Node Listing ---
|
|---|
| 71 |
|
|---|
| 72 | Invoking cpio
|
|---|
| 73 |
|
|---|
| 74 | * Copy-out mode::
|
|---|
| 75 | * Copy-in mode::
|
|---|
| 76 | * Copy-pass mode::
|
|---|
| 77 | * Options::
|
|---|
| 78 | @end detailmenu
|
|---|
| 79 | @end menu
|
|---|
| 80 |
|
|---|
| 81 | @node Introduction, Tutorial, Top, Top
|
|---|
| 82 | @comment node-name, next, previous, up
|
|---|
| 83 | @chapter Introduction
|
|---|
| 84 |
|
|---|
| 85 | GNU cpio copies files into or out of a cpio or tar archive, The archive
|
|---|
| 86 | can be another file on the disk, a magnetic tape, or a pipe.
|
|---|
| 87 |
|
|---|
| 88 | GNU cpio supports the following archive formats: binary, old ASCII, new
|
|---|
| 89 | ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. The
|
|---|
| 90 | tar format is provided for compatibility with the tar program. By
|
|---|
| 91 | default, cpio creates binary format archives, for compatibility with
|
|---|
| 92 | older cpio programs. When extracting from archives, cpio automatically
|
|---|
| 93 | recognizes which kind of archive it is reading and can read archives
|
|---|
| 94 | created on machines with a different byte-order.
|
|---|
| 95 |
|
|---|
| 96 | @node Tutorial, Invoking `cpio', Introduction, Top
|
|---|
| 97 | @comment node-name, next, previous, up
|
|---|
| 98 | @chapter Tutorial
|
|---|
| 99 | @cindex creating a cpio archive
|
|---|
| 100 | @cindex extracting a cpio archive
|
|---|
| 101 | @cindex copying directory structures
|
|---|
| 102 | @cindex passing directory structures
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 | GNU cpio performs three primary functions. Copying files to an
|
|---|
| 106 | archive, Extracting files from an archive, and passing files to another
|
|---|
| 107 | directory tree. An archive can be a file on disk, one or more floppy
|
|---|
| 108 | disks, or one or more tapes.
|
|---|
| 109 |
|
|---|
| 110 | When creating an archive, cpio takes the list of files to be processed
|
|---|
| 111 | from the standard input, and then sends the archive to the standard
|
|---|
| 112 | output, or to the device defined by the @samp{-F} option.
|
|---|
| 113 | @xref{Copy-out mode}. Usually find or ls is used to provide this list
|
|---|
| 114 | to the standard input. In the following example you can see the
|
|---|
| 115 | possibilities for archiving the contents of a single directory.
|
|---|
| 116 |
|
|---|
| 117 |
|
|---|
| 118 | @example
|
|---|
| 119 | @cartouche
|
|---|
| 120 | % ls | cpio -ov > directory.cpio
|
|---|
| 121 | @end cartouche
|
|---|
| 122 | @end example
|
|---|
| 123 |
|
|---|
| 124 | The @samp{-o} option creates the archive, and the @samp{-v} option
|
|---|
| 125 | prints the names of the files archived as they are added. Notice that
|
|---|
| 126 | the options can be put together after a single @samp{-} or can be placed
|
|---|
| 127 | separately on the command line. The @samp{>} redirects the cpio output
|
|---|
| 128 | to the file @samp{directory.cpio}.
|
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 | If you wanted to archive an entire directory tree, the find command can
|
|---|
| 132 | provide the file list to cpio:
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 | @example
|
|---|
| 136 | @cartouche
|
|---|
| 137 | % find . -print -depth | cpio -ov > tree.cpio
|
|---|
| 138 | @end cartouche
|
|---|
| 139 | @end example
|
|---|
| 140 |
|
|---|
| 141 |
|
|---|
| 142 | This will take all the files in the current directory, the directories
|
|---|
| 143 | below and place them in the archive tree.cpio. Again the @samp{-o}
|
|---|
| 144 | creates an archive, and the @samp{-v} option shows you the name of the
|
|---|
| 145 | files as they are archived. @xref{Copy-out mode}. Using the `.' in the
|
|---|
| 146 | find statement will give you more flexibility when doing restores, as it
|
|---|
| 147 | will save file names with a relative path vice a hard wired, absolute
|
|---|
| 148 | path. The @samp{-depth} option forces @samp{find} to print of the
|
|---|
| 149 | entries in a directory before printing the directory itself. This
|
|---|
| 150 | limits the effects of restrictive directory permissions by printing the
|
|---|
| 151 | directory entries in a directory before the directory name itself.
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 | Extracting an archive requires a bit more thought because cpio will not
|
|---|
| 157 | create directories by default. Another characteristic, is it will not
|
|---|
| 158 | overwrite existing files unless you tell it to.
|
|---|
| 159 |
|
|---|
| 160 |
|
|---|
| 161 | @example
|
|---|
| 162 | @cartouche
|
|---|
| 163 | % cpio -iv < directory.cpio
|
|---|
| 164 | @end cartouche
|
|---|
| 165 | @end example
|
|---|
| 166 |
|
|---|
| 167 | This will retrieve the files archived in the file directory.cpio and
|
|---|
| 168 | place them in the present directory. The @samp{-i} option extracts the
|
|---|
| 169 | archive and the @samp{-v} shows the file names as they are extracted.
|
|---|
| 170 | If you are dealing with an archived directory tree, you need to use the
|
|---|
| 171 | @samp{-d} option to create directories as necessary, something like:
|
|---|
| 172 |
|
|---|
| 173 | @example
|
|---|
| 174 | @cartouche
|
|---|
| 175 | % cpio -idv < tree.cpio
|
|---|
| 176 | @end cartouche
|
|---|
| 177 | @end example
|
|---|
| 178 |
|
|---|
| 179 | This will take the contents of the archive tree.cpio and extract it to
|
|---|
| 180 | the current directory. If you try to extract the files on top of files
|
|---|
| 181 | of the same name that already exist (and have the same or later
|
|---|
| 182 | modification time) cpio will not extract the file unless told to do so
|
|---|
| 183 | by the -u option. @xref{Copy-in mode}.
|
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 | In copy-pass mode, cpio copies files from one directory tree to another,
|
|---|
| 187 | combining the copy-out and copy-in steps without actually using an
|
|---|
| 188 | archive. It reads the list of files to copy from the standard input;
|
|---|
| 189 | the directory into which it will copy them is given as a non-option
|
|---|
| 190 | argument. @xref{Copy-pass mode}.
|
|---|
| 191 |
|
|---|
| 192 | @example
|
|---|
| 193 | @cartouche
|
|---|
| 194 | % find . -depth -print0 | cpio --null -pvd new-dir
|
|---|
| 195 | @end cartouche
|
|---|
| 196 | @end example
|
|---|
| 197 |
|
|---|
| 198 |
|
|---|
| 199 | The example shows copying the files of the present directory, and
|
|---|
| 200 | sub-directories to a new directory called new-dir. Some new options are
|
|---|
| 201 | the @samp{-print0} available with GNU find, combined with the
|
|---|
| 202 | @samp{--null} option of cpio. These two options act together to send
|
|---|
| 203 | file names between find and cpio, even if special characters are
|
|---|
| 204 | embedded in the file names. Another is @samp{-p}, which tells cpio to
|
|---|
| 205 | pass the files it finds to the directory @samp{new-dir}.
|
|---|
| 206 |
|
|---|
| 207 | @node Invoking `cpio', Media, Tutorial, Top
|
|---|
| 208 | @comment node-name, next, previous, up
|
|---|
| 209 | @chapter Invoking cpio
|
|---|
| 210 | @cindex invoking cpio
|
|---|
| 211 | @cindex command line options
|
|---|
| 212 |
|
|---|
| 213 | @menu
|
|---|
| 214 | * Copy-out mode::
|
|---|
| 215 | * Copy-in mode::
|
|---|
| 216 | * Copy-pass mode::
|
|---|
| 217 | * Options::
|
|---|
| 218 | @end menu
|
|---|
| 219 |
|
|---|
| 220 | @node Copy-out mode, Copy-in mode, Invoking `cpio', Invoking `cpio'
|
|---|
| 221 | @comment node-name, next, previous, up
|
|---|
| 222 | @section Copy-out mode
|
|---|
| 223 |
|
|---|
| 224 | In copy-out mode, cpio copies files into an archive. It reads a list
|
|---|
| 225 | of filenames, one per line, on the standard input, and writes the
|
|---|
| 226 | archive onto the standard output. A typical way to generate the list
|
|---|
| 227 | of filenames is with the find command; you should give find the -depth
|
|---|
| 228 | option to minimize problems with permissions on directories that are
|
|---|
| 229 | unreadable.
|
|---|
| 230 | @xref{Options}.
|
|---|
| 231 |
|
|---|
| 232 | @example
|
|---|
| 233 | cpio @{-o|--create@} [-0acvABLV] [-C bytes] [-H format]
|
|---|
| 234 | [-M message] [-O [[user@@]host:]archive] [-F [[user@@]host:]archive]
|
|---|
| 235 | [--file=[[user@@]host:]archive] [--format=format]
|
|---|
| 236 | [--message=message][--null] [--reset-access-time] [--verbose]
|
|---|
| 237 | [--dot] [--append] [--block-size=blocks] [--dereference]
|
|---|
| 238 | [--io-size=bytes] [--rsh-command=command] [--help] [--version]
|
|---|
| 239 | < name-list [> archive]
|
|---|
| 240 | @end example
|
|---|
| 241 |
|
|---|
| 242 | @node Copy-in mode, Copy-pass mode, Copy-out mode, Invoking `cpio'
|
|---|
| 243 | @comment node-name, next, previous, up
|
|---|
| 244 | @section Copy-in mode
|
|---|
| 245 |
|
|---|
| 246 | In copy-in mode, cpio copies files out of an archive or lists the
|
|---|
| 247 | archive contents. It reads the archive from the standard input. Any
|
|---|
| 248 | non-option command line arguments are shell globbing patterns; only
|
|---|
| 249 | files in the archive whose names match one or more of those patterns are
|
|---|
| 250 | copied from the archive. Unlike in the shell, an initial `.' in a
|
|---|
| 251 | filename does match a wildcard at the start of a pattern, and a `/' in a
|
|---|
| 252 | filename can match wildcards. If no patterns are given, all files are
|
|---|
| 253 | extracted. @xref{Options}.
|
|---|
| 254 |
|
|---|
| 255 | @example
|
|---|
| 256 | cpio @{-i|--extract@} [-bcdfmnrtsuvBSV] [-C bytes] [-E file]
|
|---|
| 257 | [-H format] [-M message] [-R [user][:.][group]]
|
|---|
| 258 | [-I [[user@@]host:]archive] [-F [[user@@]host:]archive]
|
|---|
| 259 | [--file=[[user@@]host:]archive] [--make-directories]
|
|---|
| 260 | [--nonmatching] [--preserve-modification-time]
|
|---|
| 261 | [--numeric-uid-gid] [--rename] [--list] [--swap-bytes] [--swap]
|
|---|
| 262 | [--dot] [--unconditional] [--verbose] [--block-size=blocks]
|
|---|
| 263 | [--swap-halfwords] [--io-size=bytes] [--pattern-file=file]
|
|---|
| 264 | [--format=format] [--owner=[user][:.][group]]
|
|---|
| 265 | [--no-preserve-owner] [--message=message] [--help] [--version]
|
|---|
| 266 | [--no-absolute-filenames] [--sparse] [-only-verify-crc] [-quiet]
|
|---|
| 267 | [--rsh-command=command] [pattern...] [< archive]
|
|---|
| 268 | @end example
|
|---|
| 269 |
|
|---|
| 270 | @node Copy-pass mode, Options, Copy-in mode, Invoking `cpio'
|
|---|
| 271 | @comment node-name, next, previous, up
|
|---|
| 272 | @section Copy-pass mode
|
|---|
| 273 |
|
|---|
| 274 | In copy-pass mode, cpio copies files from one directory tree to
|
|---|
| 275 | another, combining the copy-out and copy-in steps without actually
|
|---|
| 276 | using an archive. It reads the list of files to copy from the
|
|---|
| 277 | standard input; the directory into which it will copy them is given as
|
|---|
| 278 | a non-option argument.
|
|---|
| 279 | @xref{Options}.
|
|---|
| 280 |
|
|---|
| 281 | @example
|
|---|
| 282 | cpio @{-p|--pass-through@} [-0adlmuvLV] [-R [user][:.][group]]
|
|---|
| 283 | [--null] [--reset-access-time] [--make-directories] [--link]
|
|---|
| 284 | [--preserve-modification-time] [--unconditional] [--verbose]
|
|---|
| 285 | [--dot] [--dereference] [--owner=[user][:.][group]] [--sparse]
|
|---|
| 286 | [--no-preserve-owner] [--help] [--version] destination-directory
|
|---|
| 287 | < name-list
|
|---|
| 288 | @end example
|
|---|
| 289 |
|
|---|
| 290 |
|
|---|
| 291 |
|
|---|
| 292 | @node Options, , Copy-pass mode, Invoking `cpio'
|
|---|
| 293 | @comment node-name, next, previous, up
|
|---|
| 294 | @section Options
|
|---|
| 295 |
|
|---|
| 296 |
|
|---|
| 297 | @table @code
|
|---|
| 298 |
|
|---|
| 299 |
|
|---|
| 300 | @item -0, --null
|
|---|
| 301 | Read a list of filenames terminated by a null character, instead of a
|
|---|
| 302 | newline, so that files whose names contain newlines can be archived.
|
|---|
| 303 | GNU find is one way to produce a list of null-terminated filenames.
|
|---|
| 304 | This option may be used in copy-out and copy-pass modes.
|
|---|
| 305 |
|
|---|
| 306 | @item -a, --reset-access-time
|
|---|
| 307 | Reset the access times of files after reading them, so
|
|---|
| 308 | that it does not look like they have just been read.
|
|---|
| 309 |
|
|---|
| 310 | @item -A, --append
|
|---|
| 311 | Append to an existing archive. Only works in copy-out
|
|---|
| 312 | mode. The archive must be a disk file specified with
|
|---|
| 313 | the -O or -F (--file) option.
|
|---|
| 314 |
|
|---|
| 315 | @item -b, --swap
|
|---|
| 316 | Swap both halfwords of words and bytes of halfwords in the data.
|
|---|
| 317 | Equivalent to -sS. This option may be used in copy-in mode. Use this
|
|---|
| 318 | option to convert 32-bit integers between big-endian and little-endian
|
|---|
| 319 | machines.
|
|---|
| 320 |
|
|---|
| 321 | @item -B
|
|---|
| 322 | Set the I/O block size to 5120 bytes. Initially the
|
|---|
| 323 | block size is 512 bytes.
|
|---|
| 324 |
|
|---|
| 325 | @item --block-size=BLOCK-SIZE
|
|---|
| 326 | Set the I/O block size to BLOCK-SIZE * 512 bytes.
|
|---|
| 327 |
|
|---|
| 328 | @item -c
|
|---|
| 329 | Use the old portable (ASCII) archive format.
|
|---|
| 330 |
|
|---|
| 331 | @item -C IO-SIZE, --io-size=IO-SIZE
|
|---|
| 332 | Set the I/O block size to IO-SIZE bytes.
|
|---|
| 333 |
|
|---|
| 334 | @item -d, --make-directories
|
|---|
| 335 | Create leading directories where needed.
|
|---|
| 336 |
|
|---|
| 337 | @item -E FILE, --pattern-file=FILE
|
|---|
| 338 | Read additional patterns specifying filenames to extract or list from
|
|---|
| 339 | FILE. The lines of FILE are treated as if they had been non-option
|
|---|
| 340 | arguments to cpio. This option is used in copy-in mode,
|
|---|
| 341 |
|
|---|
| 342 | @item -f, --nonmatching
|
|---|
| 343 | Only copy files that do not match any of the given
|
|---|
| 344 | patterns.
|
|---|
| 345 |
|
|---|
| 346 | @item -F, --file=archive
|
|---|
| 347 | Archive filename to use instead of standard input or output. To use a
|
|---|
| 348 | tape drive on another machine as the archive, use a filename that starts
|
|---|
| 349 | with `HOSTNAME:'. The hostname can be preceded by a username and an
|
|---|
| 350 | `@@' to access the remote tape drive as that user, if you have
|
|---|
| 351 | permission to do so (typically an entry in that user's `~/.rhosts'
|
|---|
| 352 | file).
|
|---|
| 353 |
|
|---|
| 354 | @item --force-local
|
|---|
| 355 | With -F, -I, or -O, take the archive file name to be a
|
|---|
| 356 | local file even if it contains a colon, which would
|
|---|
| 357 | ordinarily indicate a remote host name.
|
|---|
| 358 |
|
|---|
| 359 | @item -H FORMAT, --format=FORMAT
|
|---|
| 360 | Use archive format FORMAT. The valid formats are listed below; the same
|
|---|
| 361 | names are also recognized in all-caps. The default in copy-in mode is
|
|---|
| 362 | to automatically detect the archive format, and in copy-out mode is
|
|---|
| 363 | @samp{bin}.
|
|---|
| 364 |
|
|---|
| 365 | @table @samp
|
|---|
| 366 | @item bin
|
|---|
| 367 | The obsolete binary format.
|
|---|
| 368 |
|
|---|
| 369 | @item odc
|
|---|
| 370 | The old (POSIX.1) portable format.
|
|---|
| 371 |
|
|---|
| 372 | @item newc
|
|---|
| 373 | The new (SVR4) portable format, which supports file systems having more
|
|---|
| 374 | than 65536 i-nodes.
|
|---|
| 375 |
|
|---|
| 376 | @item crc
|
|---|
| 377 | The new (SVR4) portable format with a checksum added.
|
|---|
| 378 |
|
|---|
| 379 | @item tar
|
|---|
| 380 | The old tar format.
|
|---|
| 381 |
|
|---|
| 382 | @item ustar
|
|---|
| 383 | The POSIX.1 tar format. Also recognizes GNU tar archives, which are
|
|---|
| 384 | similar but not identical.
|
|---|
| 385 |
|
|---|
| 386 | @item hpbin
|
|---|
| 387 | The obsolete binary format used by HPUX's cpio (which stores device
|
|---|
| 388 | files differently).
|
|---|
| 389 |
|
|---|
| 390 | @item hpodc
|
|---|
| 391 | The portable format used by HPUX's cpio (which stores device files
|
|---|
| 392 | differently).
|
|---|
| 393 | @end table
|
|---|
| 394 |
|
|---|
| 395 | @item -i, --extract
|
|---|
| 396 | Run in copy-in mode.
|
|---|
| 397 | @xref{Copy-in mode}.
|
|---|
| 398 |
|
|---|
| 399 | @item -I archive
|
|---|
| 400 | Archive filename to use instead of standard input. To use a tape drive
|
|---|
| 401 | on another machine as the archive, use a filename that starts with
|
|---|
| 402 | `HOSTNAME:'. The hostname can be preceded by a username and an `@@' to
|
|---|
| 403 | access the remote tape drive as that user, if you have permission to do
|
|---|
| 404 | so (typically an entry in that user's `~/.rhosts' file).
|
|---|
| 405 |
|
|---|
| 406 | @item -k
|
|---|
| 407 | Ignored; for compatibility with other versions of cpio.
|
|---|
| 408 |
|
|---|
| 409 | @item -l, --link
|
|---|
| 410 | Link files instead of copying them, when possible.
|
|---|
| 411 |
|
|---|
| 412 | @item -L, --dereference
|
|---|
| 413 | Copy the file that a symbolic link points to, rather than the symbolic
|
|---|
| 414 | link itself.
|
|---|
| 415 |
|
|---|
| 416 | @item -m, --preserve-modification-time
|
|---|
| 417 | Retain previous file modification times when creating files.
|
|---|
| 418 |
|
|---|
| 419 | @item -M MESSAGE, --message=MESSAGE
|
|---|
| 420 | Print MESSAGE when the end of a volume of the backup media (such as a
|
|---|
| 421 | tape or a floppy disk) is reached, to prompt the user to insert a new
|
|---|
| 422 | volume. If MESSAGE contains the string "%d", it is replaced by the
|
|---|
| 423 | current volume number (starting at 1).
|
|---|
| 424 |
|
|---|
| 425 | @item -n, --numeric-uid-gid
|
|---|
| 426 | Show numeric UID and GID instead of translating them into names when using the
|
|---|
| 427 | @samp{--verbose option}.
|
|---|
| 428 |
|
|---|
| 429 | @item --no-absolute-filenames
|
|---|
| 430 | Create all files relative to the current directory in copy-in mode, even
|
|---|
| 431 | if they have an absolute file name in the archive.
|
|---|
| 432 |
|
|---|
| 433 | @item --no-preserve-owner
|
|---|
| 434 | Do not change the ownership of the files; leave them owned by the user
|
|---|
| 435 | extracting them. This is the default for non-root users, so that users
|
|---|
| 436 | on System V don't inadvertantly give away files. This option can be
|
|---|
| 437 | used in copy-in mode and copy-pass mode
|
|---|
| 438 |
|
|---|
| 439 | @item -o, --create
|
|---|
| 440 | Run in copy-out mode.
|
|---|
| 441 | @xref{Copy-out mode}.
|
|---|
| 442 |
|
|---|
| 443 | @item -O archive
|
|---|
| 444 | Archive filename to use instead of standard output. To use a tape drive
|
|---|
| 445 | on another machine as the archive, use a filename that starts with
|
|---|
| 446 | `HOSTNAME:'. The hostname can be preceded by a username and an `@@' to
|
|---|
| 447 | access the remote tape drive as that user, if you have permission to do
|
|---|
| 448 | so (typically an entry in that user's `~/.rhosts' file).
|
|---|
| 449 |
|
|---|
| 450 | @item --only-verify-crc
|
|---|
| 451 | Verify the CRC's of each file in the archive, when reading a CRC format
|
|---|
| 452 | archive. Don't actually extract the files.
|
|---|
| 453 |
|
|---|
| 454 | @item -p, --pass-through
|
|---|
| 455 | Run in copy-pass mode.
|
|---|
| 456 | @xref{Copy-pass mode}.
|
|---|
| 457 |
|
|---|
| 458 | @item --quiet
|
|---|
| 459 | Do not print the number of blocks copied.
|
|---|
| 460 |
|
|---|
| 461 | @item -r, --rename
|
|---|
| 462 | Interactively rename files.
|
|---|
| 463 |
|
|---|
| 464 | @item -R [user][:.][group], --owner [user][:.][group]
|
|---|
| 465 | Set the ownership of all files created to the specified user and/or
|
|---|
| 466 | group in copy-out and copy-pass modes. Either the user, the group, or
|
|---|
| 467 | both, must be present. If the group is omitted but the ":" or "."
|
|---|
| 468 | separator is given, use the given user's login group. Only the
|
|---|
| 469 | super-user can change files' ownership.
|
|---|
| 470 |
|
|---|
| 471 | @item --rsh-command=COMMAND
|
|---|
| 472 | Notifies cpio that is should use COMMAND to communicate with remote
|
|---|
| 473 | devices.
|
|---|
| 474 |
|
|---|
| 475 | @item -s, --swap-bytes
|
|---|
| 476 | Swap the bytes of each halfword (pair of bytes) in the files.This option
|
|---|
| 477 | can be used in copy-in mode.
|
|---|
| 478 |
|
|---|
| 479 | @item -S, --swap-halfwords
|
|---|
| 480 | Swap the halfwords of each word (4 bytes) in the files. This option may
|
|---|
| 481 | be used in copy-in mode.
|
|---|
| 482 |
|
|---|
| 483 | @item --sparse
|
|---|
| 484 | Write files with large blocks of zeros as sparse files. This option is
|
|---|
| 485 | used in copy-in and copy-pass modes.
|
|---|
| 486 |
|
|---|
| 487 | @item -t, --list
|
|---|
| 488 | Print a table of contents of the input.
|
|---|
| 489 |
|
|---|
| 490 | @item -u, --unconditional
|
|---|
| 491 | Replace all files, without asking whether to replace
|
|---|
| 492 | existing newer files with older files.
|
|---|
| 493 |
|
|---|
| 494 | @item -v, --verbose
|
|---|
| 495 | List the files processed, or with @samp{-t}, give an @samp{ls -l} style
|
|---|
| 496 | table of contents listing. In a verbose table of contents of a ustar
|
|---|
| 497 | archive, user and group names in the archive that do not exist on the
|
|---|
| 498 | local system are replaced by the names that correspond locally to the
|
|---|
| 499 | numeric UID and GID stored in the archive.
|
|---|
| 500 |
|
|---|
| 501 | @item -V --dot
|
|---|
| 502 | Print a @kbd{.} for each file processed.
|
|---|
| 503 |
|
|---|
| 504 | @item --version
|
|---|
| 505 | Print the cpio program version number and exit.
|
|---|
| 506 | @end table
|
|---|
| 507 |
|
|---|
| 508 |
|
|---|
| 509 | @node Media, Reports, Invoking `cpio', Top
|
|---|
| 510 | @comment node-name, next, previous, up
|
|---|
| 511 | @chapter Magnetic Media
|
|---|
| 512 | @cindex magnetic media
|
|---|
| 513 |
|
|---|
| 514 | Archives are usually written on removable media--tape cartridges, mag
|
|---|
| 515 | tapes, or floppy disks.
|
|---|
| 516 |
|
|---|
| 517 | The amount of data a tape or disk holds depends not only on its size,
|
|---|
| 518 | but also on how it is formatted. A 2400 foot long reel of mag tape
|
|---|
| 519 | holds 40 megabytes of data when formated at 1600 bits per inch. The
|
|---|
| 520 | physically smaller EXABYTE tape cartridge holds 2.3 gigabytes.
|
|---|
| 521 |
|
|---|
| 522 | Magnetic media are re-usable--once the archive on a tape is no longer
|
|---|
| 523 | needed, the archive can be erased and the tape or disk used over. Media
|
|---|
| 524 | quality does deteriorate with use, however. Most tapes or disks should
|
|---|
| 525 | be disgarded when they begin to produce data errors.
|
|---|
| 526 |
|
|---|
| 527 | Magnetic media are written and erased using magnetic fields, and should
|
|---|
| 528 | be protected from such fields to avoid damage to stored data. Sticking
|
|---|
| 529 | a floppy disk to a filing cabinet using a magnet is probably not a good
|
|---|
| 530 | idea.
|
|---|
| 531 |
|
|---|
| 532 | @node Reports, Concept Index, Media, Top
|
|---|
| 533 | @chapter Reporting bugs or suggestions
|
|---|
| 534 |
|
|---|
| 535 | It is possible you will encounter a bug in @command{cpio}.
|
|---|
| 536 | If this happens, we would like to hear about it. As the purpose of bug
|
|---|
| 537 | reporting is to improve software, please be sure to include maximum
|
|---|
| 538 | information when reporting a bug. The information needed is:
|
|---|
| 539 |
|
|---|
| 540 | @itemize @bullet
|
|---|
| 541 | @item Version of the package you are using.
|
|---|
| 542 | @item Compilation options used when configuring the package.
|
|---|
| 543 | @item Conditions under which the bug appears.
|
|---|
| 544 | @end itemize
|
|---|
| 545 |
|
|---|
| 546 | Send your report to <bug-cpio@@gnu.org>. Allow us a couple of
|
|---|
| 547 | days to answer.
|
|---|
| 548 |
|
|---|
| 549 | @node Concept Index, , Reports, Top
|
|---|
| 550 | @comment node-name, next, previous, up
|
|---|
| 551 | @unnumbered Concept Index
|
|---|
| 552 | @printindex cp
|
|---|
| 553 | @contents
|
|---|
| 554 | @bye
|
|---|