Updated man page to document new behaviour of -Z, -z and -Q flags.
[unix-history] / gnu / usr.bin / cpio / README
CommitLineData
60a17f4e
JH
1This is GNU cpio, a program to manage archives of files.
2As of version 2.0, it supports the features of the System V release 4
3cpio, including support for tar archives.
4
5The main advantages of GNU cpio over Unix versions are:
6
7* It can access tape drives on other hosts using TCP/IP.
8
9* `-o' and `-p' can copy symbolic links either as symbolic links or,
10with `-L', as the files they point to.
11
12* `-i' automatically recognizes the archive format and tries to
13recover from corrupted archives.
14
15* The output of '-itv' looks like 'ls -l'.
16
17* It accepts long-named options as well as traditional
18single-character options.
19
20A few features of other versions of cpio are missing from GNU cpio, including:
21
22* The `-6' option to support Sixth Edition Unix cpio archives with `-i'.
23
24* An option to limit volume size, like afio -s.
25
26
27GNU cpio supports the POSIX.1 "ustar" tar format. GNU tar supports a
28somewhat different, early draft of that format. That draft format has
29a slightly different magic number in the tar header and doesn't
30include the path prefix part of the header, which allows storing file
31names that are longer than 100 characters. GNU cpio knows to
32recognize the nonstandard GNU tar "ustar" archives.
33
34The following patch to GNU tar 1.11.1 makes GNU tar recognize standard
35"ustar" archives, such as GNU cpio produces, except that it won't use
36the path prefix. Without this patch, GNU tar thinks that standard
37"ustar" archives are old-format tar archives and can not use the extra
38information that "ustar" format contains. If you use this patch,
39remember that you will lose the beginnings of paths that are longer
40than 100 characters. That's why it's not an official part of GNU tar.
41(Adding support for the path prefix to GNU tar is not trivial.)
42
43--- list.c.orig Mon Sep 14 17:04:03 1992
44+++ list.c Wed Oct 14 14:02:28 1992
45@@ -439,7 +439,7 @@
46 st->st_ctime = from_oct(1+12, header->header.ctime);
47 }
48
49- if (0==strcmp(header->header.magic, TMAGIC)) {
50+ if (0==strncmp(header->header.magic, TMAGIC, 5)) {
51 /* Unix Standard tar archive */
52 *stdp = 1;
53 if (wantug) {
54
55Mail suggestions and bug reports for GNU cpio to
56bug-gnu-utils@prep.ai.mit.edu.