aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 11:10:26 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-01-30 12:13:28 +0200
commita3987da2a573bd2438f15df6faa680922025be18 (patch)
treeccab2a2da1af43253e8027f89ea3703a3f3672bd
parent69014cd645779484724d579fc0d302bbaf146ff2 (diff)
downloadcpio-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--.gitignore2
-rw-r--r--NEWS4
-rw-r--r--doc/cpio.1340
-rw-r--r--doc/cpio.texi546
-rw-r--r--src/main.c44
-rw-r--r--src/util.c4
6 files changed, 763 insertions, 177 deletions
diff --git a/.gitignore b/.gitignore
index ea5bcba..f1bcbd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,7 +25,9 @@ config.status
25configure 25configure
26core 26core
27gnu 27gnu
28gnulib
28lib 29lib
29m4 30m4
31paxutils
30rmt 32rmt
31stamp-h1 33stamp-h1
diff --git a/NEWS b/NEWS
index ecb3c37..a7d2a57 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
1GNU cpio NEWS -- history of user-visible changes. 2014-01-28 1GNU cpio NEWS -- history of user-visible changes. 2014-01-30
2Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009,
32010, 2014 Free Software Foundation, Inc. 32010, 2014 Free Software Foundation, Inc.
4See the end of file for copying conditions. 4See the end of file for copying conditions.
@@ -7,6 +7,8 @@ Please send cpio bug reports to <bug-cpio@gnu.org>.
7 7
8Version 2.11.90 - Git 8Version 2.11.90 - Git
9 9
10* Improved documentation.
11* Manpages are installed by make install.
10 12
11 13
12Version 2.11 - Sergey Poznyakoff, 2010-03-10 14Version 2.11 - Sergey Poznyakoff, 2010-03-10
diff --git a/doc/cpio.1 b/doc/cpio.1
index a3d81ca..53f9395 100644
--- a/doc/cpio.1
+++ b/doc/cpio.1
@@ -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
18cpio \- copy files to and from archives 18cpio \- 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]
49GNU cpio is fully documented in the texinfo documentation. To access the 62[\fB\-\-owner=\fR[\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]]
50help 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
69This manpage is a short description of GNU \fBcpio\fR. For a detailed
70discussion, including examples and usage recommendations, refer to the
71\fBGNU Cpio Manual\fR available in texinfo format. If the \fBinfo\fR
72reader and the cpio documentation are properly installed on your
73system, the command
51.PP 74.PP
52\fBinfo cpio 75.RS +4
76.B info cpio
77.RE
53.PP 78.PP
54The online copy of the documentation is available at the following address: 79should give you access to the complete manual.
55.PP 80.PP
56http://www.gnu.org/software/cpio/manual 81You can also view the manual using the info mode in
82.BR emacs (1),
83or 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
89If any discrepancies occur between this manpage and the
90\fBGNU Cpio Manual\fR, the later shall be considered the authoritative
91source.
92.SH DESCRIPTION
93GNU \fBcpio\fR copies files between archives and directories. It
94supports the following archive formats: old binary cpio, old portable
95cpio, SVR4 cpio with and without checksum, HP cpio, and various tar
96formats.
97.PP
98The operation mode is requested by one of the following options:
99.TP
100.BR \-o ", " \-\-create
101Copy-out. Read a list of file names from the standard input and
102create on the standard output (unless overridden by the \fB\-\-file\fR
103option) an archive containing these files.
104.TP
105.BR \-i ", " \-\-extract
106Copy-in. Read the archive from standard input (or from the file
107supplied 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
109output. If one or more \fIpattern\fRs are supplied, read or list only
110files matching these patterns. The \fB\-t\fR option alone implies
111\fB\-i\fR.
112.TP
113.BR \-p ", " \-\-pass\-through
114Pass-through. Read a list of file names from the standard input and
115copy them to the specified directory.
116.TP
117.BR \-? ", " \-\-help
118Give a short help summary and exit.
119.TP
120.B \-\-usage
121Print a short usage message and exit.
122.TP
123.B \-\-version
124Print program version and exit.
125.SH OPTIONS
126.SS Operation modifiers valid in any mode
127.TP
128\fB\-\-block\-size=\FIBLOCK-SIZE\fR
129Set the I/O block size to \fIBLOCK-SIZE\fR * 512 bytes.
130.TP
131.B \-B
132Set the I/O block size to 5120 bytes.
133.TP
134.B \-c
135Use 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
139Set the I/O block size to the given \fINUMBER\fR of bytes.
140.TP
141\fB\-D\fR, \fB\-\-directory=\fIDIR\fR
142Change to directory \fIDIR\fR.
143.TP
144.B \-\-force\-local
145Archive file is local, even if its name contains colons.
146.TP
147\fB\-H\fR, \fB\-\-format=\fIFORMAT\fR
148Use given archive \fBFORMAT\fR. Valid formats are (the number in
149parentheses gives maximum size for individual archive member):
150.RS
151.TP
152.B bin
153The obsolete binary format. (2147483647 bytes)
154.TP
155.B odc
156The old (POSIX.1) portable format. (8589934591 bytes)
157.TP
158.B newc
159The new (SVR4) portable format, which supports file systems
160having more than 65536 i-nodes. (4294967295 bytes)
161.TP
162.B crc
163The new (SVR4) portable format with a checksum added.
164.TP
165.B tar
166The old tar format. (8589934591 bytes)
167.TP
168.B ustar
169The POSIX.1 tar format. Also recognizes GNU tar archives,
170which are similar but not identical. (8589934591 bytes)
171.TP
172.B hpbin
173The obsolete binary format used by HPUX's cpio (which stores
174device files differently).
175.TP
176.B hpodc
177The portable format used by HPUX's cpio (which stores device
178files differently).
179.RE
180.TP
181\fB\-R\fR, \fB\-\-owner=\fR[\fIUSER\fR][\fB:.\fR][\fIGROUP\fR]
182In copy-in and copy-pass mode, set the ownership of all files created