cpio: Options

1 
1 3.4 Options
1 ===========
1 
1 This section summarizes all available command line options.  References
1 in square brackets after each option indicate 'cpio' modes in which this
1 option is valid.
1 
1 '-0'
1 '--null'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Read a list of filenames terminated by a null character, instead of
1      a newline, so that files whose names contain newlines can be
1      archived.  GNU find is one way to produce a list of null-terminated
1      filenames.  This option may be used in copy-out and copy-pass
1      modes.
1 
1 '-a'
1 '--reset-access-time'
1      [⇒copy-out,⇒copy-pass]
1      Reset the access times of files after reading them, so that it does
1      not look like they have just been read.
1 
1 '-A'
1 '--append'
1      [⇒copy-out]
1      Append to an existing archive.  Only works in copy-out mode.  The
1      archive must be a disk file specified with the '-O' or '-F'
1      ('--file') option.
1 
1 '-b'
1 '--swap'
1      [⇒copy-in]
1      Swap both halfwords of words and bytes of halfwords in the data.
1      Equivalent to '-sS'.  This option may be used in copy-in mode.  Use
1      this option to convert 32-bit integers between big-endian and
1      little-endian machines.
1 
1 '-B'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Set the I/O block size to 5120 bytes.  Initially the block size is
1      512 bytes.
1 
1 '--block-size=BLOCK-SIZE'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Set the I/O block size to BLOCK-SIZE * 512 bytes.
1 
1 '-c'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Identical to "-H newc", use the new (SVR4) portable format.  If you
1      wish the old portable (ASCII) archive format, use "-H odc" instead.
1 
1 '-C IO-SIZE'
1 '--io-size=IO-SIZE'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Set the I/O block size to IO-SIZE bytes.
1 
1 '-d'
1 '--make-directories'
1      [⇒copy-in,⇒copy-pass]
1      Create leading directories where needed.
1 
1 '-D DIR'
1 '--directory=DIR'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Change to the directory DIR before starting the operation.  This
1      can be used, for example, to extract an archive contents in a
1      different directory:
1 
1           $ cpio -i -D /usr/local < archive
1 
1      or to copy-pass files from one directory to another:
1 
1           $ cpio -D /usr/bin -p /usr/local/bin < filelist
1 
1      The '-D' option does not affect file names supplied as arguments to
1      another command line options, such as '-F' or '-E'.  For example,
1      the following invocation:
1 
1           cpio -D /tmp/foo -d -i -F arc
1 
1      instructs 'cpio' to open the archive file 'arc' in the current
1      working directory, then change to the directory '/tmp/foo' and
1      extract files to that directory.  If '/tmp/foo' does not exist, it
1      will be created first (the '-d' option) and then changed to.
1 
1 '-E FILE'
1 '--pattern-file=FILE'
1      [⇒copy-in]
1      Read additional patterns specifying filenames to extract or list
1      from FILE.  The lines of FILE are treated as if they had been
1      non-option arguments to cpio.  This option is used in copy-in mode,
1 
1 '-f'
1 '--nonmatching'
1      [⇒copy-in]
1      Only copy files that do not match any of the given patterns.
1 
1 '-F ARCHIVE'
1 '--file=ARCHIVE'
1      [⇒copy-in,⇒copy-out]
1      Archive filename to use instead of standard input or output.  To
1      use a tape drive on another machine as the archive, use a filename
1      that starts with 'HOSTNAME:', where HOSTNAME is the name or IP
1      address of the machine.  The hostname can be preceded by a username
1      and an '@' to access the remote tape drive as that user, if you
1      have permission to do so (typically an entry in that user's
1      '~/.rhosts' file).
1 
1 '--force-local'
1      [⇒copy-in,⇒copy-out]
1      With '-F', '-I', or '-O', take the archive file name to be a local
1      file even if it contains a colon, which would ordinarily indicate a
1      remote host name.
1 
1 '-H FORMAT'
1 '--format=FORMAT'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Use archive format FORMAT.  The valid formats are listed below with
1      file size limits for individual files in parentheses; the same
1      names are also recognized in all-caps.  The default in copy-in mode
1      is to automatically detect the archive format, and in copy-out mode
1      is 'bin'.
1 
1      'bin'
1           The obsolete binary format.  (2147483647 bytes)
1 
1      'odc'
1           The old (POSIX.1) portable format.  (8589934591 bytes)
1 
1      'newc'
1           The new (SVR4) portable format, which supports file systems
1           having more than 65536 i-nodes.  (4294967295 bytes)
1 
1      'crc'
1           The new (SVR4) portable format with a checksum added.
1 
1      'tar'
1           The old tar format.  (8589934591 bytes)
1 
1      'ustar'
1           The POSIX.1 tar format.  Also recognizes GNU tar archives,
1           which are similar but not identical.  (8589934591 bytes)
1 
1      'hpbin'
1           The obsolete binary format used by HPUX's cpio (which stores
1           device files differently).
1 
1      'hpodc'
1           The portable format used by HPUX's cpio (which stores device
1           files differently).
1 
1 '-i'
1 '--extract'
1      Run in copy-in mode.  ⇒Copy-in mode.
1 
1 '-I ARCHIVE'
1      [⇒copy-in]
1      Archive filename to use instead of standard input.  To use a tape
1      drive on another machine as the archive, use a filename that starts
1      with 'HOSTNAME:', where HOSTNAME is the name or IP address of the
1      remote host.  The hostname can be preceded by a username and an '@'
1      to access the remote tape drive as that user, if you have
1      permission to do so (typically an entry in that user's '~/.rhosts'
1      file).
1 
1 '-l'
1 '--link'
1      [⇒copy-pass]
1      Link files instead of copying them, when possible.
1 
1 '-L'
1 '--dereference'
1      [⇒copy-in,⇒copy-pass]
1      Copy the file that a symbolic link points to, rather than the
1      symbolic link itself.
1 
1 '-m'
1 '--preserve-modification-time'
1      [⇒copy-in,⇒copy-pass]
1      Retain previous file modification times when creating files.
1 
1 '-M MESSAGE'
1 '--message=MESSAGE'
1      [⇒copy-in,⇒copy-out]
1      Print MESSAGE when the end of a volume of the backup media (such as
1      a tape or a floppy disk) is reached, to prompt the user to insert a
1      new volume.  If MESSAGE contains the string '%d', it is replaced by
1      the current volume number (starting at 1).
1 
1 '-n'
1 '--numeric-uid-gid'
1      [⇒copy-in]
1      Show numeric UID and GID instead of translating them into names
1      when using the '--verbose' option.
1 
1 '--no-absolute-filenames'
1      [⇒copy-in,⇒copy-out]
1      Create all files relative to the current directory in copy-in mode,
1      even if they have an absolute file name in the archive.
1 
1 '--no-preserve-owner'
1      [⇒copy-in,⇒copy-pass]
1      Do not change the ownership of the files; leave them owned by the
1      user extracting them.  This is the default for non-root users, so
1      that users on System V don't inadvertantly give away files.  This
1      option can be used in copy-in mode and copy-pass mode
1 
1 '-o'
1 '--create'
1      Run in copy-out mode.  ⇒Copy-out mode.
1 
1 '-O ARCHIVE'
1      [⇒copy-out]
1      Archive filename to use instead of standard output.  To use a tape
1      drive on another machine as the archive, use a filename that starts
1      with 'HOSTNAME:', where HOSTNAME is the name or IP address of the
1      machine.  The hostname can be preceded by a username and an '@' to
1      access the remote tape drive as that user, if you have permission
1      to do so (typically an entry in that user's '~/.rhosts' file).
1 
1 '--only-verify-crc'
1      [⇒copy-in]
1      Verify the CRC's of each file in the archive, when reading a CRC
1      format archive.  Don't actually extract the files.
1 
1 '-p'
1 '--pass-through'
1      Run in copy-pass mode.  ⇒Copy-pass mode.
1 
1 '--quiet'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Do not print the number of blocks copied.
1 
1 '-r'
1 '--rename'
1      [⇒copy-in]
1      Interactively rename files.
1 
1 '-R OWNER'
1 '--owner OWNER'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      In copy-in and copy-pass mode, set the ownership of all files
1      created to the specified OWNER (this operation is allowed only for
1      the super-user).  In copy-out mode, store the supplied owner
1      information in the archive.
1 
1      The argument can be either the user name or the user name and group
1      name, separated by a dot or a colon, or the group name, preceeded
1      by a dot or a colon, as shown in the examples below:
1 
1           cpio --owner smith
1           cpio --owner smith:
1           cpio --owner smith:users
1           cpio --owner :users
1 
1      The argument parts are first looked up in the system user and group
1      databases, correspondingly.  If any of them is not found there, it
1      is treated as numeric UID or GID, provided that it consists of
1      decimal digits only.
1 
1      To avoid the lookup and ensure that arguments are treated as
1      numeric values, prefix them with a plus sign, e.g.:
1 
1           cpio --owner +0
1           cpio --owner +0:
1           cpio --owner +0:+0
1           cpio --owner :+0
1 
1      If the group is omitted but the ':' or '.' separator is given, as
1      in the second example.  the given user's login group will be used.
1 
1 '--rsh-command=COMMAND'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Notifies cpio that is should use COMMAND to communicate with remote
1      devices.
1 
1 '-s'
1 '--swap-bytes'
1      [⇒copy-in]
1      Swap the bytes of each halfword (pair of bytes) in the files.  This
1      option can be used in copy-in mode.
1 
1 '-S'
1 '--swap-halfwords'
1      [⇒copy-in]
1      Swap the halfwords of each word (4 bytes) in the files.  This
1      option may be used in copy-in mode.
1 
1 '--sparse'
1      [⇒copy-in,⇒copy-pass]
1      Write files with large blocks of zeros as sparse files.  This
1      option is used in copy-in and copy-pass modes.
1 
1 '-t'
1 '--list'
1      [⇒copy-in]
1      Print a table of contents of the input.  Can be used alone, as a
1      mode designator, in which case '-i' is implied.
1 
1 '--to-stdout'
1      [⇒copy-in]
1      Extract files to standard output.  This option may be used in
1      copy-in mode.
1 
1 '-u'
1 '--unconditional'
1      [⇒copy-in,⇒copy-pass]
1      Replace all files, without asking whether to replace existing newer
1      files with older files.
1 
1 '-v'
1 '--verbose'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      List the files processed, or with '-t', give an 'ls -l' style table
1      of contents listing.  In a verbose table of contents of a ustar
1      archive, user and group names in the archive that do not exist on
1      the local system are replaced by the names that correspond locally
1      to the numeric UID and GID stored in the archive.
1 
1 '-V'
1 '--dot'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Print a '.' for each file processed.
1 
1 '--version'
1      Print the cpio program version number and exit.
1 
1 '-W'
1 '--warning=FLAG'
1      [⇒copy-in,⇒copy-out,⇒copy-pass]
1      Control warning display.  The argument is one of the following:
1 
1      none
1           Disable all warnings.
1      all
1           Enable all warnings.
1      truncate
1           Warn about truncation of file header fields.
1      no-truncate
1           Disable truncation warnings.
1