diff options
-rw-r--r-- | doc/.cvsignore | 2 | ||||
-rw-r--r-- | doc/Makefile.am | 20 | ||||
-rw-r--r-- | doc/cpio.1 | 340 | ||||
-rw-r--r-- | doc/cpio.info | 493 | ||||
-rw-r--r-- | doc/cpio.texi | 563 | ||||
-rw-r--r-- | doc/mt.1 | 126 | ||||
-rw-r--r-- | src/.cvsignore | 11 | ||||
-rw-r--r-- | src/Makefile.am | 81 | ||||
-rw-r--r-- | src/alloca.c | 495 | ||||
-rw-r--r-- | src/argmatch.c | 87 | ||||
-rw-r--r-- | src/bcopy.c | 19 | ||||
-rw-r--r-- | src/copyin.c | 1605 | ||||
-rw-r--r-- | src/copyout.c | 827 | ||||
-rw-r--r-- | src/copypass.c | 482 | ||||
-rw-r--r-- | src/cpio.h | 69 | ||||
-rw-r--r-- | src/cpiohdr.h | 90 | ||||
-rw-r--r-- | src/defer.c | 46 | ||||
-rw-r--r-- | src/defer.h | 25 | ||||
-rw-r--r-- | src/dirname.c | 70 | ||||
-rw-r--r-- | src/dstring.c | 118 | ||||
-rw-r--r-- | src/dstring.h | 49 | ||||
-rw-r--r-- | src/error.c | 109 | ||||
-rw-r--r-- | src/extern.h | 198 | ||||
-rw-r--r-- | src/filemode.c | 255 | ||||
-rw-r--r-- | src/filetypes.h | 84 | ||||
-rw-r--r-- | src/fnmatch.c | 200 | ||||
-rw-r--r-- | src/fnmatch.h | 67 | ||||
-rw-r--r-- | src/getopt.c | 765 | ||||
-rw-r--r-- | src/getopt.h | 129 | ||||
-rw-r--r-- | src/getopt1.c | 180 | ||||
-rw-r--r-- | src/gettext.h | 68 | ||||
-rw-r--r-- | src/global.c | 204 | ||||
-rw-r--r-- | src/idcache.c | 210 | ||||
-rw-r--r-- | src/main.c | 550 | ||||
-rw-r--r-- | src/makepath.c | 311 | ||||
-rw-r--r-- | src/mkdir.c | 100 | ||||
-rw-r--r-- | src/mt.c | 366 | ||||
-rw-r--r-- | src/rmt.c | 473 | ||||
-rw-r--r-- | src/rmt.h | 98 | ||||
-rw-r--r-- | src/rtapelib.c | 601 | ||||
-rw-r--r-- | src/safe-stat.h | 1 | ||||
-rw-r--r-- | src/strdup.c | 43 | ||||
-rw-r--r-- | src/strerror.c | 63 | ||||
-rw-r--r-- | src/stripslash.c | 43 | ||||
-rw-r--r-- | src/system.h | 146 | ||||
-rw-r--r-- | src/tar.c | 528 | ||||
-rw-r--r-- | src/tar.h | 112 | ||||
-rw-r--r-- | src/tarhdr.h | 62 | ||||
-rw-r--r-- | src/userspec.c | 265 | ||||
-rw-r--r-- | src/util.c | 1376 | ||||
-rw-r--r-- | src/xmalloc.c | 103 | ||||
-rw-r--r-- | src/xstrdup.c | 36 |
52 files changed, 13364 insertions, 0 deletions
diff --git a/doc/.cvsignore b/doc/.cvsignore new file mode 100644 index 0000000..3dda729 --- /dev/null +++ b/doc/.cvsignore | |||
@@ -0,0 +1,2 @@ | |||
1 | Makefile.in | ||
2 | Makefile | ||
diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..c3ec682 --- /dev/null +++ b/doc/Makefile.am | |||
@@ -0,0 +1,20 @@ | |||
1 | # This file is part of GNU cpio | ||
2 | # Copyright (C) 2004 Free Software Foundation, Inc. | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License as published by | ||
6 | # the Free Software Foundation; either version 2, or (at your option) | ||
7 | # any later version. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License along | ||
15 | # with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
17 | |||
18 | info_TEXINFOS = cpio.texi | ||
19 | man_MANS = cpio.1 mt.1 | ||
20 | EXTRA_DIST = $(man_MANS) | ||
diff --git a/doc/cpio.1 b/doc/cpio.1 new file mode 100644 index 0000000..5051f8d --- /dev/null +++ b/doc/cpio.1 | |||
@@ -0,0 +1,340 @@ | |||
1 | .TH CPIO 1L \" -*- nroff -*- | ||
2 | .SH NAME | ||
3 | cpio \- copy files to and from archives | ||
4 | .SH SYNOPSIS | ||
5 | .B cpio | ||
6 | {\-o|\-\-create} [\-0acvABLV] [\-C bytes] [\-H format] [\-M message] | ||
7 | [\-O [[user@]host:]archive] [\-F [[user@]host:]archive] | ||
8 | [\-\-file=[[user@]host:]archive] [\-\-format=format] [\-\-message=message] | ||
9 | [\-\-null] [\-\-reset-access-time] [\-\-verbose] [\-\-dot] [\-\-append] | ||
10 | [\-\-block-size=blocks] [\-\-dereference] [\-\-io-size=bytes] [\-\-quiet] | ||
11 | [\-\-force\-local] [\-\-rsh-command=command] [\-\-help] [\-\-version] | ||
12 | < name-list [> archive] | ||
13 | |||
14 | .B cpio | ||
15 | {\-i|\-\-extract} [\-bcdfmnrtsuvBSV] [\-C bytes] [\-E file] [\-H format] | ||
16 | [\-M message] [\-R [user][:.][group]] [\-I [[user@]host:]archive] | ||
17 | [\-F [[user@]host:]archive] [\-\-file=[[user@]host:]archive] | ||
18 | [\-\-make-directories] [\-\-nonmatching] [\-\-preserve-modification-time] | ||
19 | [\-\-numeric-uid-gid] [\-\-rename] [\-t|\-\-list] [\-\-swap-bytes] [\-\-swap] [\-\-dot] | ||
20 | [\-\-unconditional] [\-\-verbose] [\-\-block-size=blocks] [\-\-swap-halfwords] | ||
21 | [\-\-io-size=bytes] [\-\-pattern-file=file] [\-\-format=format] | ||
22 | [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message] | ||
23 | [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse] | ||
24 | [\-\-only\-verify\-crc] [\-\-quiet] [\-\-rsh-command=command] [\-\-help] | ||
25 | [\-\-version] [pattern...] [< archive] | ||
26 | |||
27 | .B cpio | ||
28 | {\-p|\-\-pass-through} [\-0adlmuvLV] [\-R [user][:.][group]] | ||
29 | [\-\-null] [\-\-reset-access-time] [\-\-make-directories] [\-\-link] [\-\-quiet] | ||
30 | [\-\-preserve-modification-time] [\-\-unconditional] [\-\-verbose] [\-\-dot] | ||
31 | [\-\-dereference] [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] | ||
32 | [\-\-sparse] [\-\-help] [\-\-version] destination-directory < name-list | ||
33 | .SH DESCRIPTION | ||
34 | This manual page | ||
35 | documents the GNU version of | ||
36 | .BR cpio . | ||
37 | .B cpio | ||
38 | copies files into or out of a cpio or tar archive, which is a file that | ||
39 | contains other files plus information about them, such as their | ||
40 | file name, owner, timestamps, and access permissions. The archive can | ||
41 | be another file on the disk, a magnetic tape, or a pipe. | ||
42 | .B cpio | ||
43 | has three operating modes. | ||
44 | .PP | ||
45 | In copy-out mode, | ||
46 | .B cpio | ||
47 | copies files into an archive. It reads a list of filenames, one per | ||
48 | line, on the standard input, and writes the archive onto the standard | ||
49 | output. A typical way to generate the list of filenames is with the | ||
50 | .B find | ||
51 | command; you should give | ||
52 | .B find | ||
53 | the \-depth option to minimize problems with permissions on | ||
54 | directories that are unwritable or not searchable. | ||
55 | .PP | ||
56 | In copy-in mode, | ||
57 | .B cpio | ||
58 | copies files out of an archive or lists the archive contents. It | ||
59 | reads the archive from the standard input. Any non-option command | ||
60 | line arguments are shell globbing patterns; only files in the archive | ||
61 | whose names match one or more of those patterns are copied from the | ||
62 | archive. Unlike in the shell, an initial `.' in a filename does | ||
63 | match a wildcard at the start of a pattern, and a `/' in a filename | ||
64 | can match wildcards. If no patterns are given, all files are | ||
65 | extracted. | ||
66 | .PP | ||
67 | In copy-pass mode, | ||
68 | .B cpio | ||
69 | copies files from one directory tree to another, combining the | ||
70 | copy-out and copy-in steps without actually using an archive. | ||
71 | It reads the list of files to copy from the standard input; the | ||
72 | directory into which it will copy them is given as a non-option | ||
73 | argument. | ||
74 | .PP | ||
75 | .B cpio | ||
76 | supports the following archive formats: binary, old ASCII, new | ||
77 | ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar. | ||
78 | The binary format | ||
79 | is obsolete because it encodes information about the files in a way | ||
80 | that is not portable between different machine architectures. | ||
81 | The old ASCII format is portable between different machine architectures, | ||
82 | but should not be used on file systems with more than 65536 i-nodes. | ||
83 | The new ASCII format is portable between different machine architectures | ||
84 | and can be used on any size file system, but is not supported by all | ||
85 | versions of | ||
86 | .BR cpio ; | ||
87 | currently, it is only supported by GNU and Unix System V R4. | ||
88 | The crc format is | ||
89 | like the new ASCII format, but also contains a checksum for each file | ||
90 | which | ||
91 | .B cpio | ||
92 | calculates when creating an archive | ||
93 | and verifies when the file is extracted from the archive. | ||
94 | The HPUX formats are provided for compatibility with HPUX's cpio which | ||
95 | stores device files differently. | ||
96 | .PP | ||
97 | The tar format is provided for compatability with | ||
98 | the | ||
99 | .B tar | ||
100 | program. It can not be used to archive files with names | ||
101 | longer than 100 characters, and can not be used to archive "special" | ||
102 | (block or character devices) files. | ||
103 | The POSIX.1 tar format can not be used to archive files with names longer | ||
104 | than 255 characters (less unless they have a "/" in just the right place). | ||
105 | .PP | ||
106 | By default, | ||
107 | .B cpio | ||
108 | creates binary format archives, for compatibility with | ||
109 | older | ||
110 | .B cpio | ||
111 | programs. | ||
112 | When extracting from archives, | ||
113 | .B cpio | ||
114 | automatically recognizes which kind of archive it is reading and can | ||
115 | read archives created on machines with a different byte-order. | ||
116 | .PP | ||
117 | Some of the options to | ||
118 | .B cpio | ||
119 | apply only to certain operating modes; see the SYNOPSIS section for a | ||
120 | list of which options are allowed in which modes. | ||
121 | .SS OPTIONS | ||
122 | .TP | ||
123 | .I "\-0, \-\-null" | ||
124 | In copy-out and copy-pass modes, read a list of filenames terminated | ||
125 | by a null character instead of a newline, so that files whose names | ||
126 | contain newlines can be archived. GNU | ||
127 | .B find | ||
128 | is one way to produce a list of null-terminated filenames. | ||
129 | .TP | ||
130 | .I "\-a, \-\-reset-access-time" | ||
131 | Reset the access times of files after reading them, so that it does | ||
132 | not look like they have just been read. | ||
133 | .TP | ||
134 | .I "\-A, \-\-append" | ||
135 | Append to an existing archive. Only works in copy-out mode. The | ||