[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Copy-in mode

In copy-in mode, cpio copies files from an archive into the filesystem or lists the archive contents. It reads the archive from the standard input. Any non-option command line arguments are shell globbing patterns; only files in the archive whose names match one or more of those patterns are copied from the archive. Unlike in the shell, an initial ‘.’ in a filename does match a wildcard at the start of a pattern, and a ‘/’ in a filename can match wildcards. If no patterns are given, all files are extracted.

The copy-in mode is requested by the ‘-i’ (‘--extract’) command line option.

The following options can be used in copy-in mode:

--absolute-filenames

Do not strip file system prefix components from the file names. This is the default.

--no-absolute-filenames

Create all files relative to the current directory.

--block-size=block-size

Sets the I/O block size to block-size * 512 bytes.

-b
--swap

Swap both halfwords of words and bytes of halfwords in the data. Equivalent to ‘-sS’.

-B

Set the I/O block size to 5120 bytes.

-c

Use the old portable (ASCII) archive format.

-C number
--io-size=number

Set the I/O block size to the given number of bytes.

-D dir
--directory=dir

Change to directory dir

-d
--make-directories

Create leading directories where needed.

-E file
--pattern-file=file

Read additional patterns specifying filenames to extract or list from file.

-f
--nonmatching

Only copy files that do not match any of the given patterns.

--force-local

Treat the archive file as local, even if its name contains colons.

-F [[user@]host:]archive-file
-I [[user@]host:]archive-file
--file=[[user@]host:]archive-file

Use the supplied archive-file instead of standard input. Optional user and host specify the user and host names in case of a remote archive.

-H format
--format=format

Use given archive format. See format, for a list of available formats.

-m
--preserve-modification-time

Retain previous file modification times when creating files.

-M string
--message=string

Print string when the end of a volume of the backup media is reached.

--no-preserve-owner

Do not change the ownership of the files.

-n
--numeric-uid-gid

In the verbose table of contents listing, show numeric UID and GID values.

--only-verify-crc

When reading a CRC format archive, only verify the CRC’s of each file in the archive, don’t actually extract the files

--quiet

Do not print the number of blocks copied.

--rsh-command=command

Use command instead of rsh to access remote archives.

-r
--rename

Interactively rename files

--sparse

Write files with large blocks of zeros as sparse files.

-s
--swap-bytes

Swap the bytes of each halfword in the files

-S
--swap-halfwords

Swap the halfwords of each word (4 bytes) in the files

--to-stdout

Extract files to standard output.

-u
--unconditional

Replace all files unconditionally.

-v
--verbose

Verbosely list the files processed.

-V
--dot

Print a ‘.’ for each file processed.

-W
--warning=flag

Control warning display. Argument is one of ‘none’, ‘truncate’, ‘no-truncate’ or ‘all’. See warning, for a detailed discussion of these.


[ << ] [ < ] [ Up ] [ > ] [ >> ]

This document was generated on May 1, 2023 using texi2html 5.0.