diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-01-30 11:10:26 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2014-01-30 12:13:28 +0200 |
commit | a3987da2a573bd2438f15df6faa680922025be18 (patch) | |
tree | ccab2a2da1af43253e8027f89ea3703a3f3672bd | |
parent | 69014cd645779484724d579fc0d302bbaf146ff2 (diff) | |
download | cpio-a3987da2a573bd2438f15df6faa680922025be18.tar.gz cpio-a3987da2a573bd2438f15df6faa680922025be18.tar.bz2 |
Improve documentation.
* .gitignore: Update.
* NEWS: Update.
* doc/cpio.1: Rewrite.
* doc/cpio.texi: Major revamp.
* src/main.c (options): Fix sectioning of the help output.
(parse_opt):
* src/util.c: Use PAXEXIT_FAILURE to indicate an error.
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | doc/cpio.1 | 340 | ||||
-rw-r--r-- | doc/cpio.texi | 546 | ||||
-rw-r--r-- | src/main.c | 44 | ||||
-rw-r--r-- | src/util.c | 4 |
6 files changed, 763 insertions, 177 deletions
@@ -25,7 +25,9 @@ config.status | |||
25 | configure | 25 | configure |
26 | core | 26 | core |
27 | gnu | 27 | gnu |
28 | gnulib | ||
28 | lib | 29 | lib |
29 | m4 | 30 | m4 |
31 | paxutils | ||
30 | rmt | 32 | rmt |
31 | stamp-h1 | 33 | stamp-h1 |
@@ -1,4 +1,4 @@ | |||
1 | GNU cpio NEWS -- history of user-visible changes. 2014-01-28 | 1 | GNU cpio NEWS -- history of user-visible changes. 2014-01-30 |
2 | Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, | 2 | Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, |
3 | 2010, 2014 Free Software Foundation, Inc. | 3 | 2010, 2014 Free Software Foundation, Inc. |
4 | See the end of file for copying conditions. | 4 | See the end of file for copying conditions. |
@@ -7,6 +7,8 @@ Please send cpio bug reports to <bug-cpio@gnu.org>. | |||
7 | 7 | ||
8 | Version 2.11.90 - Git | 8 | Version 2.11.90 - Git |
9 | 9 | ||
10 | * Improved documentation. | ||
11 | * Manpages are installed by make install. | ||
10 | 12 | ||
11 | 13 | ||
12 | Version 2.11 - Sergey Poznyakoff, 2010-03-10 | 14 | Version 2.11 - Sergey Poznyakoff, 2010-03-10 |
@@ -13,44 +13,324 @@ | |||
13 | .\" | 13 | .\" |
14 | .\" You should have received a copy of the GNU General Public License | 14 | .\" You should have received a copy of the GNU General Public License |
15 | .\" along with GNU cpio. If not, see <http://www.gnu.org/licenses/>. | 15 | .\" along with GNU cpio. If not, see <http://www.gnu.org/licenses/>. |
16 | .TH CPIO 1 "January 28, 2014" "CPIO" "GNU CPIO" | 16 | .TH CPIO 1 "January 29, 2014" "CPIO" "GNU CPIO" |
17 | .SH NAME | 17 | .SH NAME |
18 | cpio \- copy files to and from archives | 18 | cpio \- copy files to and from archives |
19 | .SH SYNOPSIS | 19 | .SH SYNOPSIS |
20 | .B cpio | 20 | .B cpio |
21 | {\-o|\-\-create} [\-0acvABLV] [\-C bytes] [\-H format] [\-M message] | 21 | {\fB\-o\fR|\fB\-\-create\fR} [\fB\-0acvABLV\fR] [\fB\-C\fR \fIBYTES\fR] |
22 | [\-O [[user@]host:]archive] [\-F [[user@]host:]archive] | 22 | [\fB\-H\fR \fIFORMAT\fR] [\fB\-M\fR \fIMESSAGE\fR] |
23 | [\-\-file=[[user@]host:]archive] [\-\-format=format] [\-\-message=message] | 23 | [\fB\-O\fR [[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR] |
24 | [\-\-null] [\-\-reset-access-time] [\-\-verbose] [\-\-dot] [\-\-append] | 24 | [\fB\-F\fR [[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR] |
25 | [\-\-block-size=blocks] [\-\-dereference] [\-\-io-size=bytes] [\-\-quiet] | 25 | [\fB\-\-file=\fR[[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR] |
26 | [\-\-force\-local] [\-\-rsh-command=command] [\-\-help] [\-\-version] | 26 | [\fB\-\-format=\fIFORMAT\fR] [\fB\-\-message=\fIMESSAGE\fR] |
27 | < name-list [> archive] | 27 | [\fB\-\-null\fR] [\fB\-\-reset\-access\-time\fR] [\fB\-\-verbose\fR] |
28 | [\fB\-\-dot\fR] [\fB\-\-append\fR] | ||
29 | [\fB\-\-block\-size=\fIblocks\fR] [\fB\-\-dereference\fR] | ||
30 | [\fB\-\-io\-size=\fIBYTES\fR] [\fB\-\-quiet\fR] | ||
31 | [\fB\-\-force\-local\fR] [\fB\-\-rsh\-command=\fICOMMAND\fR] | ||
32 | < \fIname-list\fR [\fB>\fR \fIarchive\fR] | ||
28 | 33 | ||
29 | .B cpio | 34 | .B cpio |
30 | {\-i|\-\-extract} [\-bcdfmnrtsuvBSV] [\-C bytes] [\-E file] [\-H format] | 35 | {\fB\-i\fR|\fB\-\-extract\fR} [\fB\-bcdfmnrtsuvBSV\fR] [\fB\-C\fR \fIBYTES\fR] |
31 | [\-M message] [\-R [user][:.][group]] [\-I [[user@]host:]archive] | 36 | [\fB\-E\fR \fIFILE\fR] [\fB\-H\fR \fIFORMAT\fR] |
32 | [\-F [[user@]host:]archive] [\-\-file=[[user@]host:]archive] | 37 | [\fB\-M\fR \fIMESSAGE\fR] [\fB\-R\fR [\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]] |
33 | [\-\-make-directories] [\-\-nonmatching] [\-\-preserve-modification-time] | 38 | [\fB\-I\fR [[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR] |
34 | [\-\-numeric-uid-gid] [\-\-rename] [\-t|\-\-list] [\-\-swap-bytes] [\-\-swap] [\-\-dot] | 39 | [\fB\-F\fR [[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR] |
35 | [\-\-unconditional] [\-\-verbose] [\-\-block-size=blocks] [\-\-swap-halfwords] | 40 | [\fB\-\-file=\fR[[\fIUSER\fB@\fR]\fIHOST\fB:\fR]\fIARCHIVE\fR] |
36 | [\-\-io-size=bytes] [\-\-pattern-file=file] [\-\-format=format] | 41 | [\fB\-\-make\-directories\fR] [\fB\-\-nonmatching\fR] |
37 | [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message] | 42 | [\fB\-\-preserve\-modification\-time\fR] [\fB\-\-numeric\-uid\-gid\fR] |
38 | [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] | 43 | [\fB\-\-rename\fR] [\fB\-\-list\fR] [\fB\-\-swap\-bytes\fR] |
39 | [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command] | 44 | [\fB\-\-swap\fR] [\fB\-\-dot\fR] [\fB\-\-unconditional\fR] |
40 | [\-\-help] [\-\-version] [pattern...] [< archive] | 45 | [\fB\-\-verbose\fR] [\fB\-\-block\-size=\fIBLOCKS\fR] |
46 | [\fB\-\-swap\-halfwords\fR] [\fB\-\-io\-size=\fIBYTES\fR] | ||
47 | [\fB\-\-pattern\-file=\fIFILE\fR] [\fB\-\-format=\fIFORMAT\fR] | ||
48 | [\fB\-\-owner=\fR[\fIUSER][\fB:.\fR][\fIGROUP\fR]] | ||
49 | [\fB\-\-no\-preserve\-owner\fR] [\fB\-\-message=\fIMESSAGE\fR] | ||
50 | [\fB\-\-force\-local\fR] [\fB\-\-no\-absolute\-filenames\fR] [\fB\-\-sparse\fR] | ||
51 | [\fB\-\-only\-verify\-crc\fR] [\fB\-\-to\-stdout\fR] [\fB\-\-quiet\fR] | ||
52 | [\fB\-\-rsh\-command=\fICOMMAND\fR] | ||
53 | [\fIpattern\fR...] [\fB<\fR \fIarchive\fR] | ||
41 | 54 | ||
42 | .B cpio | 55 | .B cpio |
43 | {\-p|\-\-pass-through} [\-0adlmuvLV] [\-R [user][:.][group]] | 56 | {\fB\-p\fR|\fB\-\-pass\-through\fR} [\fB\-0adlmuvLV\fR] |
44 | [\-\-null] [\-\-reset-access-time] [\-\-make-directories] [\-\-link] [\-\-quiet] | 57 | [\fB\-R\fR [\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]] |
45 | [\-\-preserve-modification-time] [\-\-unconditional] [\-\-verbose] [\-\-dot] | 58 | [\fB\-\-null\fR] [\fB\-\-reset\-access\-time\fR] |
46 | [\-\-dereference] [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] | 59 | [\fB\-\-make\-directories\fR] [\fB\-\-link\fR] [\fB\-\-quiet\fR] |
47 | [\-\-sparse] [\-\-help] [\-\-version] destination-directory < name-list | 60 | [\fB\-\-preserve\-modification\-time] [\fB\-\-unconditional\fR] |
48 | .SH DESCRIPTION | 61 | [\fB\-\-verbose\fR] [\fB\-\-dot\fR] [\fB\-\-dereference\fR] |
49 | GNU cpio is fully documented in the texinfo documentation. To access the | 62 | [\fB\-\-owner=\fR[\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]] |
50 | help from your command line, type | 63 | [\fB\-\-no\-preserve\-owner\fR] [\fB\-\-sparse\fR] |
64 | \fIdestination-directory\fR \fB<\fR \fIname-list\fR | ||
65 | |||
66 | .B cpio | ||
67 | {\fB\-?\fR|\fB\-\-help\fR|\fB\-\-usage\fR|\fB\-\-version\fR} | ||
68 | .SH NOTE | ||
69 | This manpage is a short description of GNU \fBcpio\fR. For a detailed | ||
70 | discussion, including examples and usage recommendations, refer to the | ||
71 | \fBGNU Cpio Manual\fR available in texinfo format. If the \fBinfo\fR | ||
72 | reader and the cpio documentation are properly installed on your | ||
73 | system, the command | ||
51 | .PP | 74 | .PP |
52 | \fBinfo cpio | 75 | .RS +4 |
76 | .B info cpio | ||
77 | .RE | ||
53 | .PP | 78 | .PP |
54 | The online copy of the documentation is available at the following address: | 79 | should give you access to the complete manual. |
55 | .PP | 80 | .PP |
56 | http://www.gnu.org/software/cpio/manual | 81 | You can also view the manual using the info mode in |
82 | .BR emacs (1), | ||
83 | or find it in various formats online at | ||
84 | .PP | ||
85 | .RS +4 | ||
86 | .B http://www.gnu.org/software/cpio/manual | ||
87 | .RE | ||
88 | .PP | ||
89 | If any discrepancies occur between this manpage and the | ||
90 | \fBGNU Cpio Manual\fR, the later shall be considered the authoritative | ||
91 | source. | ||
92 | .SH DESCRIPTION | ||
93 | GNU \fBcpio\fR copies files between archives and directories. It | ||
94 | supports the following archive formats: old binary cpio, old portable | ||
95 | cpio, SVR4 cpio with and without checksum, HP cpio, and various tar | ||
96 | formats. | ||
97 | .PP | ||
98 | The operation mode is requested by one of the following options: | ||
99 | .TP | ||
100 | .BR \-o ", " \-\-create | ||
101 | Copy-out. Read a list of file names from the standard input and | ||
102 | create on the standard output (unless overridden by the \fB\-\-file\fR | ||
103 | option) an archive containing these files. | ||
104 | .TP | ||
105 | .BR \-i ", " \-\-extract | ||
106 | Copy-in. Read the archive from standard input (or from the file | ||
107 | supplied with the \fB\-\-file\fR option) and extract files from it, or | ||
108 | (if the \fB\-t\fR option is given) list its contents to the standard | ||
109 | output. If one or more \fIpattern\fRs are supplied, read or list only | ||
110 | files matching these patterns. The \fB\-t\fR option alone implies | ||
111 | \fB\-i\fR. | ||
112 | .TP | ||
113 | .BR \-p ", " \-\-pass\-through | ||
114 | Pass-through. Read a list of file names from the standard input and | ||
115 | copy them to the specified directory. | ||
116 | .TP | ||
117 | .BR \-? ", " \-\-help | ||
118 | Give a short help summary and exit. | ||
119 | .TP | ||
120 | .B \-\-usage | ||
121 | Print a short usage message and exit. | ||
122 | .TP | ||
123 | .B \-\-version | ||
124 | Print program version and exit. | ||
125 | .SH OPTIONS | ||
126 | .SS Operation modifiers valid in any mode | ||
127 | .TP | ||
128 | \fB\-\-block\-size=\FIBLOCK-SIZE\fR | ||
129 | Set the I/O block size to \fIBLOCK-SIZE\fR * 512 bytes. | ||
130 | .TP | ||
131 | .B \-B | ||
132 | Set the I/O block size to 5120 bytes. | ||
133 | .TP | ||
134 | .B \-c | ||
135 | Use the old portable (ASCII) archive format. This is the same as | ||
136 | \fB\-H odc\fR. | ||
137 | .TP | ||
138 | \fB\-C\fR, \fB\-\-io\-size=\fINUMBER\fR | ||
139 | Set the I/O block size to the given \fINUMBER\fR of bytes. | ||
140 | .TP | ||
141 | \fB\-D\fR, \fB\-\-directory=\fIDIR\fR | ||
142 | Change to directory \fIDIR\fR. | ||
143 | .TP | ||
144 | .B \-\-force\-local | ||
145 | Archive file is local, even if its name contains colons. | ||
146 | .TP | ||
147 | \fB\-H\fR, \fB\-\-format=\fIFORMAT\fR | ||
148 | Use given archive \fBFORMAT\fR. Valid formats are (the number in | ||
149 | parentheses gives maximum size for individual archive member): | ||
150 | .RS | ||
151 | .TP | ||
152 | .B bin | ||
153 | The obsolete binary format. (2147483647 bytes) | ||
154 | .TP | ||
155 | .B odc | ||
156 | The old (POSIX.1) portable format. (8589934591 bytes) | ||
157 | .TP | ||
158 | .B newc | ||
159 | The new (SVR4) portable format, which supports file systems | ||
160 | having more than 65536 i-nodes. (4294967295 bytes) | ||
161 | .TP | ||
162 | .B crc | ||
163 | The new (SVR4) portable format with a checksum added. | ||
164 | .TP | ||
165 | .B tar | ||
166 | The old tar format. (8589934591 bytes) | ||
167 | .TP | ||
168 | .B ustar | ||
169 | The POSIX.1 tar format. Also recognizes GNU tar archives, | ||
170 | which are similar but not identical. (8589934591 bytes) | ||
171 | .TP | ||
172 | .B hpbin | ||
173 | The obsolete binary format used by HPUX's cpio (which stores | ||
174 | device files differently). | ||
175 | .TP | ||
176 | .B hpodc | ||
177 | The portable format used by HPUX's cpio (which stores device | ||
178 | files differently). | ||
179 | .RE | ||
180 | .TP | ||
181 | \fB\-R\fR, \fB\-\-owner=\fR[\fIUSER\fR][\fB:.\fR][\fIGROUP\fR] | ||
182 | In copy-in and copy-pass mode, set the ownership of all files created | ||