2 .\" Copyright (c) 1997 SigmaSoft, Th. Lockert
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\" must display the following acknowledgement:
15 .\" This product includes software developed by SigmaSoft, Th. Lockert.
16 .\" 4. The name of the author may not be used to endorse or promote products
17 .\" derived from this software without specific prior written permission
19 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 .\" $OpenBSD: cpio.1,v 1.3 1997/04/06 06:11:11 millert Exp $
37 .Nd copy file archives in and out
50 .Op Fl bBcdfmrsStuvzZ6
61 .Ar destination-directory
66 command copies files to and from a
70 The following options are supported:
73 Create an archive. Reads the list of files to store in the
74 archive from standard input, and writes the archive on standard
78 Reset the access times on files that has been copied to the
81 Append to the specified archive.
83 Set block size of output to 5120 bytes.
87 header for portability.
89 Set the block size of output to
93 Use the specified file name as the archive to write to.
95 Write the archive in the specified format. Recognized
99 Old binary cpio format.
101 Old octal character cpio format.
103 SVR4 hex cpio format.
110 Follow symbolic links.
112 Be verbose about operations. List filenames as they are
113 written to the archive.
115 Compress archive using
119 Compress archive using
124 Restore files from an archive. Reads the archive file from
125 standard input and extracts files matching the
127 that were specified on the command line.
130 Do byte- and word swapping after reading in data from the
131 archive, for restoring archives created on systems with
132 different byte order.
134 Set the block size of the archive being read to 5120 bytes.
136 Expect the archive headers to be in ASCII format.
138 Read archive written with a blocksize of
141 Create any intermediate directories as needed during
144 Read list of file name patters to extract or list from
147 Restore all files except those matching the
149 given on the command line.
152 Use the specified file as the input for the archive.
154 Read an archive of the specified format. Recognized
158 Old binary cpio format.
160 Old octal character cpio format.
162 SVR4 hex cpio format.
169 Restore modification times on files.
171 Rename restored files interactively.
173 Swap bytes after reading data from the archive.
175 Swap words after reading data from the archive.
177 Only list the contents of the archive, no files or
178 directories will be created.
180 Overwrite files even when the file in the archive is
181 older than the one that will be overwritten.
183 Be verbose about operations. List filenames as they are
184 copied in from the archive.
186 Uncompress archive using
190 Uncompress archive using
194 Process old-style \*Qcpio\*U format archives.
197 Copy files from one location to another in a single pass.
198 The list of files to copy are read from standard in and
199 written out to a directory relative to the specified
204 Reset the access times on files that has been copied.
206 Create any intermediate directories as needed to write
207 the files at the new location.
209 When possible, link files rather than creating an
212 Follow symbolic links.
214 Restore modification times on files.
216 Overwrite files even when the original file being copied is
217 older than the one that will be overwritten.
219 Be verbose about operations. List filenames as they are
225 will exit with one of the following values:
228 All files were processed successfully.
235 cannot create a file or a link when extracting an archive or cannot
236 find a file while writing an archive, or cannot preserve the user
237 ID, group ID, file mode or access and modification times when the
239 options is specified, a diagnostic message is written to standard
240 error and a non-zero exit value will be returned, but processing
241 will continue. In the case where
243 cannot create a link to a file,
245 will not create a second copy of the file.
247 If the extraction of a file from an archive is prematurely terminated
248 by a signal or error,
250 may have only partially extracted the file the user wanted.
251 Additionally, the file modes of extracted files and directories may
252 have incorrect file bits, and the modification and access times may
255 If the creation of an archive is prematurely terminated by a signal
258 may have only partially created the archive which may violate the
259 specific archive format specification.
268 options are currently not implemented.
270 Keith Muller at the University of California, San Diego