1 .\" $Id: cpio.1,v 1.2 89/02/12 10:08:42 mark Exp $
2 .TH CPIO 1 "USENIX Association" ""
4 cpio \- copy file archives in and out
19 utility produces and reads files in the format specified by the
21 .B "Archive/Interchange File Format"
23 .IR "IEEE Std. 1003.1-1988" .
27 (copy in) utility extracts files from the standard input, which is
28 assumed to be the product of a previous
30 Only files with names that match
35 may be specified and if no
37 are specified, the default for
39 is \*, selecting all files.
40 The extracted files are conditionally created and copied into the
41 current directory, and possibly any levels below, based upon the
42 options described below and the permissions of the files will be those
45 The owner and group of the files will be that of the current user
46 unless the user has appropriate privileges, which causes
48 to retains the owner and group of the files of the previous
53 (pass) utility reads the standard input to obtain a list of path names
54 of files that are conditionally created and copied into the
57 based upon the options described below.
59 If an error is detected, the cause is reported and the
61 utility will continue to copy other files.
63 will skip over any unrecognized files which it encounters in the archive.
65 The following restrictions apply to the
69 Pathnames are restricted to 256 characters.
71 Appropriate privileges are required to copy special files.
73 Blocks are reported in 512-byte quantities.
75 The following options are available:
78 Input/output is to be blocked 5120 bytes to the record.
83 for data that is directed to or from character special files.
86 Reset access times of input files after they have been copied.
89 option is also specified, the linked files do not have their access
97 Write header information in ASCII character for for portability.
102 Note that this option should always be used to write portable files.
105 Creates directories as needed.
106 Can only be used with
112 Copy in all files except those in
114 Can only be used with
118 Whenever possible, link files rather than copying them.
119 Can only be used with
123 Retain previous modification times.
124 This option is ineffective on directories that are being copied.
125 Can only be used with
131 Interactively rename files.
132 The user is asked whether to rename
135 Read and write permissions for
137 are required for this option.
138 If the user types a null line, the file is skipped.
139 Should only be used with
145 Print a table of contents of the input.
146 No files are created.
147 Can only be used with
151 Copy files unconditionally; usually an older file will not replace a
152 new file with the same name.
153 Can only be used with
159 Verbose: cause the names of the affected files to be printed.
160 Can only be used with
162 Provides a detailed listing when used with the
166 The following operands are available:
169 Simple regular expressions given in the name-generating notation of the
173 The destination directory.
177 utility exits with one of the following values:
180 All input files were copied.
183 The utility encountered errors in copying or accessing files or
185 An error will be reported for nonexistent files or directories, or
186 permissions that do not allow the user to access the source or target
189 It is important to use the
193 utility to generate pathnames for
195 This eliminates problems
197 could have trying to create files under read-only directories.
199 The following command:
201 ls | cpio -o > ../newfile
203 copies out the files listed by the
205 utility and redirects them to the file
208 The following command:
210 cat newfile | cpio -id "memo/al" "memo/b*"
216 utility, takes those files that match the patterns
220 creates the directories below the current directory, and places the
221 files in the appropriate directories.
225 find . -depth -print | cpio -pdlmv newdir
227 takes the file names piped to it from the
229 utility and copies or links those files to another directory
232 while retaining the modification time.
236 used to prompt the user for information when the
240 options are specified.
242 find(1), pax(1), tar(1), cpio(5), tar(5)
244 Copyright (c) 1989 Mark H. Colburn.
248 Redistribution and use in source and binary forms are permitted
249 provided that the above copyright notice is duplicated in all such
250 forms and that any documentation, advertising materials, and other
251 materials related to such distribution and use acknowledge that the
252 software was developed by Mark H. Colburn and sponsored by The
255 THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
256 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
257 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
263 117 Mackubin Street, Suite 1
270 .B "The USENIX Association"
271 for public distribution.