|
|
1.1 root 1: CPIO COHERENT (USENIX Association) CPIO
2: NAME
3: cpio - copy file archives in and out
4: SYNOPSIS
5: cpio -o[Bacv]
6: cpio -i[Bcdfmrtuv] [pattern...]
7: cpio -p[adlmruv] directory
8: DESCRIPTION
9: The cpio utility produces and reads files in the format
10: specified by the cpio Archive/Interchange File Format
11: specified in IEEE Std. 1003.1-1988.
12: The cpio -i (copy in) utility extracts files from the
13: standard input, which is assumed to be the product of a
14: previous cpio -o . Only files with names that match patterns
15: are selected. Multiple patterns may be specified and if no
16: patterns are specified, the default for patterns is
17: selecting all files. The extracted files are conditionally
18: created and copied into the current directory, and possibly
19: any levels below, based upon the options described below and
20: the permissions of the files will be those of the previous
21: cpio -o . The owner and group of the files will be that of
22: the current user unless the user has appropriate privileges,
23: which causes cpio to retains the owner and group of the
24: files of the previous cpio -o .
25: The cpio -p (pass) utility reads the standard input to
26: obtain a list of path names of files that are conditionally
27: created and copied into the destination directory based upon
28: the options described below.
29: If an error is detected, the cause is reported and the cpio
30: utility will continue to copy other files. cpio will skip
31: over any unrecognized files which it encounters in the
32: archive.
33: The following restrictions apply to the cpio utility:
34: 1 Pathnames are restricted to 256 characters.
35: 2 Appropriate privileges are required to copy special files.
36: 3 Blocks are reported in 512-byte quantities.
37: Options
38: The following options are available:
39: -B Input/output is to be blocked 5120 bytes to the record.
40: Can only be used with cpio -o or cpio -i for data that
41: is directed to or from character special files.
42: Page 1 (printed 5/24/90)
43: CPIO COHERENT (USENIX Association) CPIO
44: -a Reset access times of input files after they have been
45: copied. When the -l option is also specified, the
46: linked files do not have their access times reset. Can
47: only be used with cpio -o or cpio -i .
48: -c Write header information in ASCII character for
49: portability. Can only be used with cpio -i or cpio -o
50: . Note that this option should always be used to write
51: portable files.
52: -d Creates directories as needed. Can only be used with
53: cpio -i or cpio -p .
54: -f Copy in all files except those in patterns . Can only
55: be used with cpio -i .
56: -l Whenever possible, link files rather than copying them.
57: Can only be used with cpio -p .
58: -m Retain previous modification times. This option is
59: ineffective on directories that are being copied. Can
60: only be used with cpio -i or cpio -p .
61: -r Interactively rename files. The user is asked whether
62: to rename pattern each invocation. Read and write
63: permissions for /dev/tty are required for this option.
64: If the user types a null line, the file is skipped.
65: Should only be used with cpio -i or cpio -o .
66: -t Print a table of contents of the input. No files are
67: created. Can only be used with cpio -i .
68: -u Copy files unconditionally; usually an older file will
69: not replace a new file with the same name. Can only be
70: used with cpio -i or cpio -p .
71: -v Verbose: cause the names of the affected files to be
72: printed. Can only be used with cpio -i . Provides a
73: detailed listing when used with the -t option.
74: Operands
75: The following operands are available:
76: patterns Simple regular expressions given in the name-
77: generating notation of the shell.
78: directory The destination directory.
79: Exit Status
80: The cpio utility exits with one of the following values:
81: 0 All input files were copied.
82: Page 2 (printed 5/24/90)
83: CPIO COHERENT (USENIX Association) CPIO
84: 2 The utility encountered errors in copying or accessing
85: files or directories. An error will be reported for
86: nonexistent files or directories, or permissions that
87: do not allow the user to access the source or target
88: files.
89: The following command:
90:
91: ls | cpio -oc > ../newfile
92:
93: copies out the files listed by the ls utility and redirects
94: them to the file ../newfile .
95: The following command:
96:
97: cat newfile | cpio -id "memo/al" "memo/b*"
98:
99: uses the output file newfile from the cpio -o utility, takes
100: those files that match the patterns memo/al and memo/b* ,
101: creates the directories below the current directory, and
102: places the files in the appropriate directories.
103: The command
104:
105: find . -print | cpio -pdlmv newdir
106:
107: takes the file names piped to it from the find utility and
108: copies or links those files to another directory named
109: newdir, while retaining the modification time.
110: FILES
111: /dev/tty used to prompt the user for information when the
112: -i or -r options are specified.
113: SEE ALSO
114: find, pax, ustar
115:
116: COPYRIGHT
117: Copyright (c) 1989 Mark H. Colburn.
118: COHERENT pax/ustar/cpio are based on original code for pax
119: which is sponsored by The USENIX Association.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.