1 CPIO(1) NetBSD General Commands Manual CPIO(1)
4 c
\bcp
\bpi
\bio
\bo - copy file archives in and out
6 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
7 c
\bcp
\bpi
\bio
\bo -
\b-o
\bo [-
\b-a
\baA
\bAB
\bBc
\bcL
\bLv
\bvz
\bzZ
\bZ] [-
\b-C
\bC _
\bb_
\by_
\bt_
\be_
\bs] [-
\b-F
\bF _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be] [-
\b-H
\bH _
\bf_
\bo_
\br_
\bm_
\ba_
\bt] [-
\b-O
\bO _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be] _
\b<
8 _
\bn_
\ba_
\bm_
\be_
\b-_
\bl_
\bi_
\bs_
\bt [_
\b> _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be]
9 c
\bcp
\bpi
\bio
\bo -
\b-i
\bi [-
\b-b
\bbB
\bBc
\bcd
\bdf
\bfm
\bmr
\brs
\bsS
\bSt
\btu
\buv
\bvz
\bzZ
\bZ6
\b6] [-
\b-C
\bC _
\bb_
\by_
\bt_
\be_
\bs] [-
\b-E
\bE _
\bf_
\bi_
\bl_
\be] [-
\b-F
\bF _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be] [-
\b-H
\bH _
\bf_
\bo_
\br_
\bm_
\ba_
\bt]
10 [-
\b-I
\bI _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be] [_
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn _
\b._
\b._
\b.] [_
\b< _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be]
11 c
\bcp
\bpi
\bio
\bo -
\b-p
\bp [-
\b-a
\bad
\bdl
\blL
\bLm
\bmu
\buv
\bv] _
\bd_
\be_
\bs_
\bt_
\bi_
\bn_
\ba_
\bt_
\bi_
\bo_
\bn_
\b-_
\bd_
\bi_
\br_
\be_
\bc_
\bt_
\bo_
\br_
\by _
\b< _
\bn_
\ba_
\bm_
\be_
\b-_
\bl_
\bi_
\bs_
\bt
13 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
14 The c
\bcp
\bpi
\bio
\bo command copies files to and from a c
\bcp
\bpi
\bio
\bo archive. If the archive
15 is of the form: _
\b[_
\b[_
\bu_
\bs_
\be_
\br_
\b@_
\b]_
\bh_
\bo_
\bs_
\bt_
\b:_
\b]_
\bf_
\bi_
\bl_
\be then the archive will be processed
18 The options are as follows:
20 -
\b-o
\bo, -
\b--
\b-c
\bcr
\bre
\bea
\bat
\bte
\be
21 Create an archive. Reads the list of files to store in the ar-
22 chive from standard input, and writes the archive on standard
25 -
\b-a
\ba, -
\b--
\b-r
\bre
\bes
\bse
\bet
\bt-
\b-a
\bac
\bcc
\bce
\bes
\bss
\bs-
\b-t
\bti
\bim
\bme
\be
26 Reset the access times on files that have been copied to
29 -
\b-A
\bA, -
\b--
\b-a
\bap
\bpp
\bpe
\ben
\bnd
\bd
30 Append to the specified archive.
32 -
\b-B
\bB Set block size of output to 5120 bytes.
34 -
\b-c
\bc Use ASCII format for c
\bcp
\bpi
\bio
\bo header for portability.
36 -
\b-C
\bC _
\bb_
\by_
\bt_
\be_
\bs
37 Set the block size of output to _
\bb_
\by_
\bt_
\be_
\bs.
39 -
\b-F
\bF _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be
41 -
\b-O
\bO _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be
42 Use the specified file name as the archive to write to.
44 -
\b-H
\bH _
\bf_
\bo_
\br_
\bm_
\ba_
\bt
45 Write the archive in the specified format. Recognized
48 _
\bb_
\bc_
\bp_
\bi_
\bo Old binary c
\bcp
\bpi
\bio
\bo format.
49 _
\bc_
\bp_
\bi_
\bo Old octal character c
\bcp
\bpi
\bio
\bo format.
50 _
\bs_
\bv_
\b4_
\bc_
\bp_
\bi_
\bo SVR4 hex c
\bcp
\bpi
\bio
\bo format.
51 _
\bt_
\ba_
\br Old tar format.
52 _
\bu_
\bs_
\bt_
\ba_
\br POSIX ustar format.
54 -
\b-L
\bL Follow symbolic links.
56 -
\b-v
\bv Be verbose about operations. List filenames as they are
57 written to the archive.
59 -
\b-z
\bz Compress archive using gzip(1) format.
61 -
\b-Z
\bZ Compress archive using compress(1) format.
63 -
\b-i
\bi, -
\b--
\b-e
\bex
\bxt
\btr
\bra
\bac
\bct
\bt
64 Restore files from an archive. Reads the archive file from stan-
65 dard input and extracts files matching the _
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn_
\bs that were
66 specified on the command line.
68 -
\b-b
\bb Do byte and word swapping after reading in data from the
69 archive, for restoring archives created on systems with a
72 -
\b-B
\bB Set the block size of the archive being read to 5120
75 -
\b-c
\bc Expect the archive headers to be in ASCII format.
77 -
\b-C
\bC _
\bb_
\by_
\bt_
\be_
\bs
78 Read archive written with a block size of _
\bb_
\by_
\bt_
\be_
\bs.
80 -
\b-d
\bd, -
\b--
\b-m
\bma
\bak
\bke
\be-
\b-d
\bdi
\bir
\bre
\bec
\bct
\bto
\bor
\bri
\bie
\bes
\bs
81 Create any intermediate directories as needed during
84 -
\b-E
\bE _
\bf_
\bi_
\bl_
\be, -
\b--
\b-p
\bpa
\bat
\btt
\bte
\ber
\brn
\bn-
\b-f
\bfi
\bil
\ble
\be _
\bf_
\bi_
\bl_
\be
85 Read list of file name patterns to extract or list from
88 -
\b-f
\bf, -
\b--
\b-n
\bno
\bon
\bnm
\bma
\bat
\btc
\bch
\bhi
\bin
\bng
\bg
89 Restore all files except those matching the _
\bp_
\ba_
\bt_
\bt_
\be_
\br_
\bn_
\bs
90 given on the command line.
92 -
\b-F
\bF _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be, -
\b--
\b-f
\bfi
\bil
\ble
\be _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be
94 -
\b-I
\bI _
\ba_
\br_
\bc_
\bh_
\bi_
\bv_
\be
95 Use the specified file as the input for the archive.
97 -
\b-H
\bH _
\bf_
\bo_
\br_
\bm_
\ba_
\bt, -
\b--
\b-f
\bfo
\bor
\brm
\bma
\bat
\bt _
\bf_
\bo_
\br_
\bm_
\ba_
\bt
98 Read an archive of the specified format. Recognized for-
101 _
\bb_
\bc_
\bp_
\bi_
\bo Old binary c
\bcp
\bpi
\bio
\bo format.
102 _
\bc_
\bp_
\bi_
\bo Old octal character c
\bcp
\bpi
\bio
\bo format.
103 _
\bs_
\bv_
\b4_
\bc_
\bp_
\bi_
\bo SVR4 hex c
\bcp
\bpi
\bio
\bo format.
104 _
\bt_
\ba_
\br Old tar format.
105 _
\bu_
\bs_
\bt_
\ba_
\br POSIX ustar format.
107 -
\b-m
\bm Restore modification times on files.
109 -
\b-r
\br, -
\b--
\b-r
\bre
\ben
\bna
\bam
\bme
\be
110 Rename restored files interactively.
112 -
\b-s
\bs Swap bytes after reading data from the archive.
114 -
\b-S
\bS, -
\b--
\b-s
\bsw
\bwa
\bap
\bp-
\b-h
\bha
\bal
\blf
\bfw
\bwo
\bor
\brd
\bds
\bs
115 Swap words after reading data from the archive.
117 -
\b-t
\bt, -
\b--
\b-l
\bli
\bis
\bst
\bt
118 Only list the contents of the archive, no files or direc-
119 tories will be created.
121 -
\b-u
\bu, -
\b--
\b-u
\bun
\bnc
\bco
\bon
\bnd
\bdi
\bit
\bti
\bio
\bon
\bna
\bal
\bl
122 Overwrite files even when the file in the archive is
123 older than the one that will be overwritten.
125 -
\b-v
\bv, -
\b--
\b-v
\bve
\ber
\brb
\bbo
\bos
\bse
\be
126 Be verbose about operations. List filenames as they are
127 copied in from the archive.
129 -
\b-z
\bz Uncompress archive using gzip(1) format.
131 -
\b-Z
\bZ Uncompress archive using compress(1) format.
133 -
\b-6
\b6 Process old-style c
\bcp
\bpi
\bio
\bo format archives.
135 -
\b-p
\bp, -
\b--
\b-p
\bpa
\bas
\bss
\bs-
\b-t
\bth
\bhr
\bro
\bou
\bug
\bgh
\bh
136 Copy files from one location to another in a single pass. The
137 list of files to copy are read from standard input and written
138 out to a directory relative to the specified _
\bd_
\bi_
\br_
\be_
\bc_
\bt_
\bo_
\br_
\by argument.
140 -
\b-a
\ba Reset the access times on files that have been copied.
142 -
\b-d
\bd Create any intermediate directories as needed to write
143 the files at the new location.
145 -
\b-l
\bl, -
\b--
\b-l
\bli
\bin
\bnk
\bk
146 When possible, link files rather than creating an extra
149 -
\b-L
\bL, -
\b--
\b-d
\bde
\ber
\bre
\bef
\bfe
\ber
\bre
\ben
\bnc
\bce
\be
150 Follow symbolic links.
152 -
\b-m
\bm, -
\b--
\b-p
\bpr
\bre
\bes
\bse
\ber
\brv
\bve
\be-
\b-m
\bmo
\bod
\bdi
\bif
\bfi
\bic
\bca
\bat
\bti
\bio
\bon
\bn-
\b-t
\bti
\bim
\bme
\be
153 Restore modification times on files.
155 -
\b-u
\bu, -
\b--
\b-u
\bun
\bnc
\bco
\bon
\bnd
\bdi
\bit
\bti
\bio
\bon
\bna
\bal
\bl
156 Overwrite files even when the original file being copied
157 is older than the one that will be overwritten.
159 -
\b-v
\bv, -
\b--
\b-v
\bve
\ber
\brb
\bbo
\bos
\bse
\be
160 Be verbose about operations. List filenames as they are
163 -
\b--
\b-f
\bfo
\bor
\brc
\bce
\be-
\b-l
\blo
\boc
\bca
\bal
\bl
164 Do not interpret filenames that contain a `:' as remote
167 -
\b--
\b-i
\bin
\bns
\bse
\bec
\bcu
\bur
\bre
\be
168 Normally c
\bcp
\bpi
\bio
\bo ignores filenames that contain `..' as a
169 path component. With this option, files that contain `..'
172 E
\bER
\bRR
\bRO
\bOR
\bRS
\bS
173 c
\bcp
\bpi
\bio
\bo will exit with one of the following values:
175 0 All files were processed successfully.
179 Whenever c
\bcp
\bpi
\bio
\bo cannot create a file or a link when extracting an archive
180 or cannot find a file while writing an archive, or cannot preserve the
181 user ID, group ID, file mode, or access and modification times when the
182 -
\b-p
\bp option is specified, a diagnostic message is written to standard error
183 and a non-zero exit value will be returned, but processing will continue.
184 In the case where c
\bcp
\bpi
\bio
\bo cannot create a link to a file, c
\bcp
\bpi
\bio
\bo will not cre-
185 ate a second copy of the file.
187 If the extraction of a file from an archive is prematurely terminated by
188 a signal or error, c
\bcp
\bpi
\bio
\bo may have only partially extracted the file the
189 user wanted. Additionally, the file modes of extracted files and direc-
190 tories may have incorrect file bits, and the modification and access
193 If the creation of an archive is prematurely terminated by a signal or
194 error, c
\bcp
\bpi
\bio
\bo may have only partially created the archive which may violate
195 the specific archive format specification.
197 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
200 A
\bAU
\bUT
\bTH
\bHO
\bOR
\bRS
\bS
201 Keith Muller at the University of California, San Diego.
204 The -
\b-s
\bs and -
\b-S
\bS options are currently not implemented.
206 NetBSD 2.0 February 13, 2004 NetBSD 2.0