1 .\" $OpenBSD: cpio.1,v 1.20 2003/11/21 20:54:02 jmc Exp $
3 .\" Copyright (c) 1997 SigmaSoft, Th. Lockert
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\" $OpenBSD: cpio.1,v 1.20 2003/11/21 20:54:02 jmc Exp $
33 .Nd copy file archives in and out
46 .Op Fl bBcdfmrsStuvzZ6
57 .Ar destination-directory
62 command copies files to and from a
66 The options are as follows:
70 Reads the list of files to store in the
71 archive from standard input, and writes the archive on standard
75 Append to the specified archive.
77 Reset the access times on files that have been copied to the
80 Set block size of output to 5120 bytes.
82 Set the block size of output to
87 header for portability.
89 Use the specified file name as the archive to write to.
91 Write the archive in the specified format.
92 Recognized formats are:
94 .Bl -tag -width sv4cpio -compact
113 Follow symbolic links.
115 Use the specified file name as the archive to write to.
117 Be verbose about operations.
118 List filenames as they are written to the archive.
120 Compress archive using
124 Compress archive using
129 Restore files from an archive.
130 Reads the archive file from
131 standard input and extracts files matching the
133 that were specified on the command line.
140 Set the block size of the archive being read to 5120 bytes.
142 Do byte and word swapping after reading in data from the
143 archive, for restoring archives created on systems with
144 a different byte order.
146 Read archive written with a block size of
149 Expect the archive headers to be in ASCII format.
151 Create any intermediate directories as needed during
154 Read list of file name patterns to extract or list from
157 Use the specified file as the input for the archive.
159 Restore all files except those matching the
161 given on the command line.
163 Read an archive of the specified format.
164 Recognized formats are:
166 .Bl -tag -width sv4cpio -compact
185 Use the specified file as the input for the archive.
187 Restore modification times on files.
189 Rename restored files interactively.
191 Swap words after reading data from the archive.
193 Swap bytes after reading data from the archive.
195 Only list the contents of the archive, no files or
196 directories will be created.
198 Overwrite files even when the file in the archive is
199 older than the one that will be overwritten.
201 Be verbose about operations.
202 List filenames as they are copied in from the archive.
204 Uncompress archive using
208 Uncompress archive using
213 Copy files from one location to another in a single pass.
214 The list of files to copy are read from standard input and
215 written out to a directory relative to the specified
218 By default, an older file will not replace a newer file with the same name.
221 Reset the access times on files that have been copied.
223 Create any intermediate directories as needed to write
224 the files at the new location.
226 Follow symbolic links.
228 When possible, link files rather than creating an
231 Restore modification times on files.
233 Overwrite files even when the original file being copied is
234 older than the one that will be overwritten.
236 Be verbose about operations.
237 List filenames as they are copied.
243 Path in which to store temporary files.
247 will exit with one of the following values:
250 All files were processed successfully.
257 cannot create a file or a link when extracting an archive or cannot
258 find a file while writing an archive, or cannot preserve the user
259 ID, group ID, file mode, or access and modification times when the
261 option is specified, a diagnostic message is written to standard
262 error and a non-zero exit value will be returned, but processing
266 cannot create a link to a file,
268 will not create a second copy of the file.
270 If the extraction of a file from an archive is prematurely terminated
271 by a signal or error,
273 may have only partially extracted the file the user wanted.
274 Additionally, the file modes of extracted files and directories may
275 have incorrect file bits, and the modification and access times may
278 If the creation of an archive is prematurely terminated by a signal
281 may have only partially created the archive, which may violate the
282 specific archive format specification.
287 Keith Muller at the University of California, San Diego.
293 options are currently not implemented.