aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/.cvsignore2
-rw-r--r--doc/Makefile.am20
-rw-r--r--doc/cpio.1340
-rw-r--r--doc/cpio.info493
-rw-r--r--doc/cpio.texi563
-rw-r--r--doc/mt.1126
-rw-r--r--src/.cvsignore11
-rw-r--r--src/Makefile.am81
-rw-r--r--src/alloca.c495
-rw-r--r--src/argmatch.c87
-rw-r--r--src/bcopy.c19
-rw-r--r--src/copyin.c1605
-rw-r--r--src/copyout.c827
-rw-r--r--src/copypass.c482
-rw-r--r--src/cpio.h69
-rw-r--r--src/cpiohdr.h90
-rw-r--r--src/defer.c46
-rw-r--r--src/defer.h25
-rw-r--r--src/dirname.c70
-rw-r--r--src/dstring.c118
-rw-r--r--src/dstring.h49
-rw-r--r--src/error.c109
-rw-r--r--src/extern.h198
-rw-r--r--src/filemode.c255
-rw-r--r--src/filetypes.h84
-rw-r--r--src/fnmatch.c200
-rw-r--r--src/fnmatch.h67
-rw-r--r--src/getopt.c765
-rw-r--r--src/getopt.h129
-rw-r--r--src/getopt1.c180
-rw-r--r--src/gettext.h68
-rw-r--r--src/global.c204
-rw-r--r--src/idcache.c210
-rw-r--r--src/main.c550
-rw-r--r--src/makepath.c311
-rw-r--r--src/mkdir.c100
-rw-r--r--src/mt.c366
-rw-r--r--src/rmt.c473
-rw-r--r--src/rmt.h98
-rw-r--r--src/rtapelib.c601
-rw-r--r--src/safe-stat.h1
-rw-r--r--src/strdup.c43
-rw-r--r--src/strerror.c63
-rw-r--r--src/stripslash.c43
-rw-r--r--src/system.h146
-rw-r--r--src/tar.c528
-rw-r--r--src/tar.h112
-rw-r--r--src/tarhdr.h62
-rw-r--r--src/userspec.c265
-rw-r--r--src/util.c1376
-rw-r--r--src/xmalloc.c103
-rw-r--r--src/xstrdup.c36
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 @@
1Makefile.in
2Makefile
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
18info_TEXINFOS = cpio.texi
19man_MANS = cpio.1 mt.1
20EXTRA_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
3cpio \- 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
34This manual page
35documents the GNU version of
36.BR cpio .
37.B cpio
38copies files into or out of a cpio or tar archive, which is a file that
39contains other files plus information about them, such as their
40file name, owner, timestamps, and access permissions. The archive can
41be another file on the disk, a magnetic tape, or a pipe.
42.B cpio
43has three operating modes.
44.PP
45In copy-out mode,
46.B cpio
47copies files into an archive. It reads a list of filenames, one per
48line, on the standard input, and writes the archive onto the standard
49output. A typical way to generate the list of filenames is with the
50.B find
51command; you should give
52.B find
53the \-depth option to minimize problems with permissions on
54directories that are unwritable or not searchable.
55.PP
56In copy-in mode,
57.B cpio
58copies files out of an archive or lists the archive contents. It
59reads the archive from the standard input. Any non-option command
60line arguments are shell globbing patterns; only files in the archive
61whose names match one or more of those patterns are copied from the
62archive. Unlike in the shell, an initial `.' in a filename does
63match a wildcard at the start of a pattern, and a `/' in a filename
64can match wildcards. If no patterns are given, all files are
65extracted.
66.PP
67In copy-pass mode,
68.B cpio
69copies files from one directory tree to another, combining the
70copy-out and copy-in steps without actually using an archive.
71It reads the list of files to copy from the standard input; the
72directory into which it will copy them is given as a non-option
73argument.
74.PP
75.B cpio
76supports the following archive formats: binary, old ASCII, new
77ASCII, crc, HPUX binary, HPUX old ASCII, old tar, and POSIX.1 tar.
78The binary format
79is obsolete because it encodes information about the files in a way
80that is not portable between different machine architectures.
81The old ASCII format is portable between different machine architectures,
82but should not be used on file systems with more than 65536 i-nodes.
83The new ASCII format is portable between different machine architectures
84and can be used on any size file system, but is not supported by all
85versions of
86.BR cpio ;
87currently, it is only supported by GNU and Unix System V R4.
88The crc format is
89like the new ASCII format, but also contains a checksum for each file
90which
91.B cpio
92calculates when creating an archive
93and verifies when the file is extracted from the archive.
94The HPUX formats are provided for compatibility with HPUX's cpio which
95stores device files differently.
96.PP
97The tar format is provided for compatability with
98the
99.B tar
100program. It can not be used to archive files with names
101longer than 100 characters, and can not be used to archive "special"
102(block or character devices) files.
103The POSIX.1 tar format can not be used to archive files with names longer
104than 255 characters (less unless they have a "/" in just the right place).
105.PP
106By default,
107.B cpio
108creates binary format archives, for compatibility with
109older
110.B cpio
111programs.
112When extracting from archives,
113.B cpio
114automatically recognizes which kind of archive it is reading and can
115read archives created on machines with a different byte-order.
116.PP
117Some of the options to
118.B cpio
119apply only to certain operating modes; see the SYNOPSIS section for a
120list of which options are allowed in which modes.
121.SS OPTIONS
122.TP
123.I "\-0, \-\-null"
124In copy-out and copy-pass modes, read a list of filenames terminated
125by a null character instead of a newline, so that files whose names
126contain newlines can be archived. GNU