2 * Copyright (c) 1992 Keith Muller.
3 * Copyright (c) 1992, 1993
4 * The Regents of the University of California. All rights reserved.
6 * This code is derived from software contributed to Berkeley by
7 * Keith Muller of the University of California, San Diego.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by the University of
20 * California, Berkeley and its contributors.
21 * 4. Neither the name of the University nor the names of its contributors
22 * may be used to endorse or promote products derived from this software
23 * without specific prior written permission.
25 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * @(#)options.c 8.2 (Berkeley) 4/18/94
38 * $FreeBSD: src/bin/pax/options.c,v 1.13.2.3 2001/08/01 05:03:11 obrien Exp $
39 * $DragonFly: src/bin/pax/options.c,v 1.9 2008/06/05 18:06:30 swildner Exp $
42 #include <sys/types.h>
59 * Routines which handle command line options
62 static char flgch[] = FLGCH; /* list of all possible flags */
63 static OPLIST *ophead = NULL; /* head for format specific options -x */
64 static OPLIST *optail = NULL; /* option tail */
66 static int no_op (void);
67 static void printflg (unsigned int);
68 static int c_frmt (const void *, const void *);
69 static off_t str_offt (char *);
70 static char *getline (FILE *fp);
71 static void pax_options (int, char **);
72 static void pax_usage (void);
73 static void tar_options (int, char **);
74 static void tar_usage (void);
75 static void cpio_options (int, char **);
76 static void cpio_usage (void);
78 /* errors from getline */
79 #define GETLINE_FILE_CORRUPT 1
80 #define GETLINE_OUT_OF_MEM 2
81 static int getline_error;
84 #define GZIP_CMD "gzip" /* command to run as gzip */
85 #define COMPRESS_CMD "compress" /* command to run as compress */
86 #define BZIP2_CMD "bzip2" /* command to run as gzip */
89 * Format specific routine table - MUST BE IN SORTED ORDER BY NAME
90 * (see pax.h for description of each function)
92 * name, blksz, hdsz, udev, hlk, blkagn, inhead, id, st_read,
93 * read, end_read, st_write, write, end_write, trail,
94 * rd_data, wr_data, options
98 /* 0: OLD BINARY CPIO */
99 {"bcpio", 5120, sizeof(HD_BCPIO), 1, 0, 0, 1, bcpio_id, cpio_strd,
100 bcpio_rd, bcpio_endrd, cpio_stwr, bcpio_wr, cpio_endwr, cpio_trail,
101 rd_wrfile, wr_rdfile, bad_opt},
103 /* 1: OLD OCTAL CHARACTER CPIO */
104 {"cpio", 5120, sizeof(HD_CPIO), 1, 0, 0, 1, cpio_id, cpio_strd,
105 cpio_rd, cpio_endrd, cpio_stwr, cpio_wr, cpio_endwr, cpio_trail,
106 rd_wrfile, wr_rdfile, bad_opt},
108 /* 2: SVR4 HEX CPIO */
109 {"sv4cpio", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, vcpio_id, cpio_strd,
110 vcpio_rd, vcpio_endrd, cpio_stwr, vcpio_wr, cpio_endwr, cpio_trail,
111 rd_wrfile, wr_rdfile, bad_opt},
113 /* 3: SVR4 HEX CPIO WITH CRC */
114 {"sv4crc", 5120, sizeof(HD_VCPIO), 1, 0, 0, 1, crc_id, crc_strd,
115 vcpio_rd, vcpio_endrd, crc_stwr, vcpio_wr, cpio_endwr, cpio_trail,
116 rd_wrfile, wr_rdfile, bad_opt},
119 {"tar", 10240, BLKMULT, 0, 1, BLKMULT, 0, tar_id, no_op,
120 tar_rd, tar_endrd, no_op, tar_wr, tar_endwr, tar_trail,
121 rd_wrfile, wr_rdfile, tar_opt},
124 {"ustar", 10240, BLKMULT, 0, 1, BLKMULT, 0, ustar_id, ustar_strd,
125 ustar_rd, tar_endrd, ustar_stwr, ustar_wr, tar_endwr, tar_trail,
126 rd_wrfile, wr_rdfile, bad_opt},
128 #define F_OCPIO 0 /* format when called as cpio -6 */
129 #define F_ACPIO 1 /* format when called as cpio -c */
130 #define F_CPIO 3 /* format when called as cpio */
131 #define F_OTAR 4 /* format when called as tar -o */
132 #define F_TAR 5 /* format when called as tar */
133 #define DEFLT 5 /* default write format from list above */
136 * ford is the archive search order used by get_arc() to determine what kind
137 * of archive we are dealing with. This helps to properly id archive formats
138 * some formats may be subsets of others....
140 int ford[] = {5, 4, 3, 2, 1, 0, -1 };
144 * figure out if we are pax, tar or cpio. Call the appropriate options
149 options(int argc, char **argv)
153 * Are we acting like pax, tar or cpio (based on argv[0])
155 if ((argv0 = strrchr(argv[0], '/')) != NULL)
160 if (strcmp(NM_TAR, argv0) == 0)
161 return(tar_options(argc, argv));
162 else if (strcmp(NM_CPIO, argv0) == 0)
163 return(cpio_options(argc, argv));
165 * assume pax as the default
168 return(pax_options(argc, argv));
173 * look at the user specified flags. set globals as required and check if
174 * the user specified a legal set of flags. If not, complain and exit
178 pax_options(int argc, char **argv)
182 unsigned int flg = 0;
183 unsigned int bflg = 0;
188 * process option flags
190 while ((c=getopt(argc,argv,"ab:cdf:iklno:p:rs:tuvwx:zB:DE:G:HLPT:U:XYZ"))
204 if ((wrblksz = (int)str_offt(optarg)) <= 0) {
205 paxwarn(1, "Invalid block size %s", optarg);
211 * inverse match on patterns
218 * match only dir on extract, not the subtree at dir
225 * filename where the archive is stored
232 * interactive file rename
239 * do not clobber files that exist
246 * try to link src to dest with copy (-rw)
253 * select first match for a pattern only
260 * pass format specific options
263 if (opt_add(optarg) < 0)
268 * specify file characteristic options
270 for (pt = optarg; *pt != '\0'; ++pt) {
274 * do not preserve access time
280 * preserve user id, group id, file
281 * mode, access/modification times
290 * do not preserve modification time
302 * preserve file mode bits
307 paxwarn(1, "Invalid -p string: %c", *pt);
322 * file name substitution name pattern
324 if (rep_add(optarg) < 0) {
332 * preserve access time on filesystem nodes we read
339 * ignore those older files
346 * verbose operation mode
359 * specify an archive format on write
362 if ((frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
363 sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt)) != NULL) {
367 paxwarn(1, "Unknown -x format: %s", optarg);
368 fputs("pax: Known -x formats are:", stderr);
369 for (i = 0; i < (sizeof(fsub)/sizeof(FSUB)); ++i)
370 fprintf(stderr, " %s", fsub[i].name);
371 fputs("\n\n", stderr);
376 * use gzip. Non standard option.
378 gzip_program = GZIP_CMD;
382 * non-standard option on number of bytes written on a
383 * single archive volume.
385 if ((wrlimit = str_offt(optarg)) <= 0) {
386 paxwarn(1, "Invalid write limit %s", optarg);
389 if (wrlimit % BLKMULT) {
390 paxwarn(1, "Write limit is not a %d byte multiple",
398 * On extraction check file inode change time before the
399 * modification of the file name. Non standard option.
406 * non-standard limit on read faults
407 * 0 indicates stop after first error, values
408 * indicate a limit, "NONE" try forever
411 if (strcmp(NONE, optarg) == 0)
413 else if ((maxflt = atoi(optarg)) < 0) {
414 paxwarn(1, "Error count value must be positive");
420 * non-standard option for selecting files within an
421 * archive by group (gid or name)
423 if (grp_add(optarg) < 0) {
431 * follow command line symlinks only
445 * do NOT follow symlinks (default)
452 * non-standard option for selecting files within an
453 * archive by modification time range (lower,upper)
455 if (trng_add(optarg) < 0) {
463 * non-standard option for selecting files within an
464 * archive by user (uid or name)
466 if (usr_add(optarg) < 0) {
474 * do not pass over mount points in the file system
481 * On extraction check file inode change time after the
482 * modification of the file name. Non standard option.
489 * On extraction check modification time after the
490 * modification of the file name. Non standard option.
502 * figure out the operation mode of pax read,write,extract,copy,append
503 * or list. check that we have not been given a bogus set of flags
504 * for the operation mode.
510 } else if (ISEXTRACT(flg)) {
513 } else if (ISARCHIVE(flg)) {
516 } else if (ISAPPND(flg)) {
519 } else if (ISCOPY(flg)) {
530 * if we are writing (ARCHIVE) we use the default format if the user
531 * did not specify a format. when we write during an APPEND, we will
532 * adopt the format of the existing archive if none was supplied.
534 if (!(flg & XF) && (act == ARCHIVE))
535 frmt = &(fsub[DEFLT]);
538 * process the args as they are interpreted by the operation mode
543 for (; optind < argc; optind++)
544 if (pat_add(argv[optind], NULL) < 0)
548 if (optind >= argc) {
549 paxwarn(0, "Destination directory was not supplied");
554 if (mkpath(dirptr) < 0)
559 for (; optind < argc; optind++)
560 if (ftree_add(argv[optind], 0) < 0)
563 * no read errors allowed on updates/append operation!
573 * look at the user specified flags. set globals as required and check if
574 * the user specified a legal set of flags. If not, complain and exit
578 tar_options(int argc, char **argv)
584 int incfiles_max = 0;
589 struct incfile *incfiles = NULL;
592 * Set default values.
597 * process option flags
599 while ((c = getoldopt(argc, argv,
600 "b:cef:hjmopqruts:vwxyzBC:HI:LOPXZ014578")) != -1) {
604 * specify blocksize in 512-byte blocks
606 if ((wrblksz = (int)str_offt(optarg)) <= 0) {
607 paxwarn(1, "Invalid block size %s", optarg);
610 wrblksz *= 512; /* XXX - check for int oflow */
620 * stop after first error
626 * filename where the archive is stored
628 if ((optarg[0] == '-') && (optarg[1]== '\0')) {
648 * use bzip2. Non standard option.
650 gzip_program = BZIP2_CMD;
654 * do not preserve modification time
659 if (opt_add("write_opt=nodir") < 0)
666 * preserve uid/gid and file mode, regardless of umask
673 * select first match for a pattern only
680 * append to the archive
686 * file name substitution name pattern
688 if (rep_add(optarg) < 0) {
695 * list contents of the tape
701 * verbose operation mode
707 * interactive file rename
713 * extract an archive, preserving mode,
714 * and mtime if possible.
721 * use gzip. Non standard option.
723 gzip_program = GZIP_CMD;
727 * Nothing to do here, this is pax default
735 * follow command line symlinks only
740 if (++nincfiles > incfiles_max) {
741 incfiles_max = nincfiles + 3;
742 incfiles = realloc(incfiles,
743 sizeof(*incfiles) * incfiles_max);
744 if (incfiles == NULL) {
745 paxwarn(0, "Unable to allocate space "
750 incfiles[nincfiles - 1].file = optarg;
751 incfiles[nincfiles - 1].dir = chdname;
761 * do not remove leading '/' from pathnames
767 * do not pass over mount points in the file system
775 gzip_program = COMPRESS_CMD;
803 /* Traditional tar behaviour (pax uses stderr unless in list mode) */
804 if (fstdin == 1 && act == ARCHIVE)
809 /* Traditional tar behaviour (pax wants to read file list from stdin) */
810 if ((act == ARCHIVE || act == APPND) && argc == 0 && nincfiles == 0)
814 * if we are writing (ARCHIVE) specify tar, otherwise run like pax
815 * (unless -o specified)
817 if (act == ARCHIVE || act == APPND)
818 frmt = &(fsub[Oflag ? F_OTAR : F_TAR]);
820 paxwarn(1, "The -O/-o options are only valid when writing an archive");
821 tar_usage(); /* only valid when writing */
825 * process the args as they are interpreted by the operation mode
833 char *file, *dir = NULL;
835 while (nincfiles || *argv != NULL) {
837 * If we queued up any include files,
838 * pull them in now. Otherwise, check
839 * for -I and -C positional flags.
840 * Anything else must be a file to
844 file = incfiles->file;
848 } else if (strcmp(*argv, "-I") == 0) {
859 if (strcmp(file, "-") == 0)
861 else if ((fp = fopen(file, "r")) == NULL) {
862 paxwarn(1, "Unable to open file '%s' for read", file);
865 while ((str = getline(fp)) != NULL) {
866 if (pat_add(str, dir) < 0)
870 if (strcmp(file, "-") != 0)
873 paxwarn(1, "Problem with file '%s'", file);
876 } else if (strcmp(*argv, "-C") == 0) {
880 } else if (pat_add(*argv++, chdname) < 0)
886 * if patterns were added, we are doing chdir()
887 * on a file-by-file basis, else, just one
888 * global chdir (if any) after opening input.
896 if (chdname != NULL) { /* initial chdir() */
897 if (ftree_add(chdname, 1) < 0)
901 while (nincfiles || *argv != NULL) {
902 char *file, *dir = NULL;
905 * If we queued up any include files, pull them in
906 * now. Otherwise, check for -I and -C positional
907 * flags. Anything else must be a file to include
911 file = incfiles->file;
915 } else if (strcmp(*argv, "-I") == 0) {
926 /* Set directory if needed */
928 if (ftree_add(dir, 1) < 0)
932 if (strcmp(file, "-") == 0)
934 else if ((fp = fopen(file, "r")) == NULL) {
935 paxwarn(1, "Unable to open file '%s' for read", file);
938 while ((str = getline(fp)) != NULL) {
939 if (ftree_add(str, 0) < 0)
942 if (strcmp(file, "-") != 0)
945 paxwarn(1, "Problem with file '%s'",
949 } else if (strcmp(*argv, "-C") == 0) {
952 if (ftree_add(*argv++, 1) < 0)
954 } else if (ftree_add(*argv++, 0) < 0)
958 * no read errors allowed on updates/append operation!
963 if (!fstdin && ((arcname == NULL) || (*arcname == '\0'))) {
964 arcname = getenv("TAPE");
965 if ((arcname == NULL) || (*arcname == '\0'))
966 arcname = _PATH_DEFTAPE;
980 slash += strspn(slash, "/");
981 slash += strcspn(slash, "/");
983 done = (*slash == '\0');
986 if (stat(path, &sb)) {
987 if (errno != ENOENT || mkdir(path, 0777)) {
988 paxwarn(1, "%s", path);
991 } else if (!S_ISDIR(sb.st_mode)) {
992 syswarn(1, ENOTDIR, "%s", path);
1004 * look at the user specified flags. set globals as required and check if
1005 * the user specified a legal set of flags. If not, complain and exit
1009 cpio_options(int argc, char **argv)
1024 while ((c=getopt(argc,argv,"abcdfiklmoprstuvzABC:E:F:H:I:LO:SZ6")) != -1)
1028 * preserve access time on files read
1034 * swap bytes and half-words when reading data
1041 frmt = &(fsub[F_ACPIO]);
1045 * create directories as needed
1051 * invert meaning of pattern list
1057 * restore an archive
1065 * use links instead of copies when possible
1071 * preserve modification time
1080 frmt = &(fsub[F_CPIO]);
1090 * interactively rename files
1096 * swap bytes after reading data
1101 * list contents of archive
1108 * replace newer files
1114 * verbose operation mode
1120 * use gzip. Non standard option.
1122 gzip_program = GZIP_CMD;
1132 * Use 5120 byte block size
1138 * set block size in bytes
1140 wrblksz = atoi(optarg);
1144 * file with patterns to extract or list
1146 if ((fp = fopen(optarg, "r")) == NULL) {
1147 paxwarn(1, "Unable to open file '%s' for read", optarg);
1150 while ((str = getline(fp)) != NULL) {
1154 if (getline_error) {
1155 paxwarn(1, "Problem with file '%s'", optarg);
1163 * filename where the archive is stored
1165 if ((optarg[0] == '-') && (optarg[1]== '\0')) {
1167 * treat a - as stdin
1176 * specify an archive format on write
1179 if ((frmt = (FSUB *)bsearch((void *)&tmp, (void *)fsub,
1180 sizeof(fsub)/sizeof(FSUB), sizeof(FSUB), c_frmt)) != NULL)
1182 paxwarn(1, "Unknown -H format: %s", optarg);
1183 fputs("cpio: Known -H formats are:", stderr);
1184 for (i = 0; i < (sizeof(fsub)/sizeof(FSUB)); ++i)
1185 fprintf(stderr, " %s", fsub[i].name);
1186 fputs("\n\n", stderr);
1191 * follow symbolic links
1197 * swap halfwords after reading data
1202 * use compress. Non standard option.
1204 gzip_program = COMPRESS_CMD;
1208 * process Version 6 cpio format
1210 frmt = &(fsub[F_OCPIO]);
1221 * process the args as they are interpreted by the operation mode
1226 while (*argv != NULL)
1227 if (pat_add(*argv++, NULL) < 0)
1231 if (*argv == NULL) {
1232 paxwarn(0, "Destination directory was not supplied");
1236 if (mkpath(dirptr) < 0)
1246 * no read errors allowed on updates/append operation!
1249 while ((str = getline(stdin)) != NULL) {
1252 if (getline_error) {
1253 paxwarn(1, "Problem while reading stdin");
1265 * print out those invalid flag sets found to the user
1269 printflg(unsigned int flg)
1274 fprintf(stderr,"%s: Invalid combination of options:", argv0);
1275 while ((nxt = ffs(flg)) != 0) {
1278 fprintf(stderr, " -%c", flgch[pos-1]);
1285 * comparison routine used by bsearch to find the format specified
1290 c_frmt(const void *a, const void *b)
1292 return(strcmp(((FSUB *)a)->name, ((FSUB *)b)->name));
1297 * called by format specific options routines to get each format specific
1298 * flag and value specified with -o
1300 * pointer to next OPLIST entry or NULL (end of list).
1308 if ((opt = ophead) != NULL)
1309 ophead = ophead->fow;
1315 * generic routine used to complain about a format specific options
1316 * when the format does not support options.
1327 * print all we were given
1329 paxwarn(1,"These format options are not supported");
1330 while ((opt = opt_next()) != NULL)
1331 fprintf(stderr, "\t%s = %s\n", opt->name, opt->value);
1338 * breaks the value supplied to -o into a option name and value. options
1339 * are given to -o in the form -o name-value,name=value
1340 * multiple -o may be specified.
1342 * 0 if format in name=value format, -1 if -o is passed junk
1353 if ((str == NULL) || (*str == '\0')) {
1354 paxwarn(0, "Invalid option name");
1357 if ((str = strdup(str)) == NULL) {
1358 paxwarn(0, "Unable to allocate space for option list");
1364 * break into name and values pieces and stuff each one into a
1365 * OPLIST structure. When we know the format, the format specific
1366 * option function will go through this list
1368 while ((frpt != NULL) && (*frpt != '\0')) {
1369 if ((endpt = strchr(frpt, ',')) != NULL)
1371 if ((pt = strchr(frpt, '=')) == NULL) {
1372 paxwarn(0, "Invalid options format");
1376 if ((opt = (OPLIST *)malloc(sizeof(OPLIST))) == NULL) {
1377 paxwarn(0, "Unable to allocate space for option list");
1389 if (ophead == NULL) {
1390 optail = ophead = opt;
1401 * Convert an expression of the following forms to an off_t > 0.
1402 * 1) A positive decimal number.
1403 * 2) A positive decimal number followed by a b (mult by 512).
1404 * 3) A positive decimal number followed by a k (mult by 1024).
1405 * 4) A positive decimal number followed by a m (mult by 512).
1406 * 5) A positive decimal number followed by a w (mult by sizeof int)
1407 * 6) Two or more positive decimal numbers (with/without k,b or w).
1408 * separated by x (also * for backwards compatibility), specifying
1409 * the product of the indicated values.
1411 * 0 for an error, a positive value o.w.
1420 num = strtoq(val, &expr, 0);
1421 if ((num == QUAD_MAX) || (num <= 0) || (expr == val))
1461 num *= str_offt(expr + 1);
1477 name = fgetln(f, &len);
1479 getline_error = ferror(f) ? GETLINE_FILE_CORRUPT : 0;
1482 if (name[len-1] != '\n')
1486 getline_error = GETLINE_OUT_OF_MEM;
1489 memcpy(temp, name, len-1);
1496 * for those option functions where the archive format has nothing to do.
1509 * print the usage summary to the user
1515 fputs("usage: pax [-cdnvz] [-E limit] [-f archive] ", stderr);
1516 fputs("[-s replstr] ... [-U user] ...", stderr);
1517 fputs("\n [-G group] ... ", stderr);
1518 fputs("[-T [from_date][,to_date]] ... ", stderr);
1519 fputs("[pattern ...]\n", stderr);
1520 fputs(" pax -r [-cdiknuvzDYZ] [-E limit] ", stderr);
1521 fputs("[-f archive] [-o options] ... \n", stderr);
1522 fputs(" [-p string] ... [-s replstr] ... ", stderr);
1523 fputs("[-U user] ... [-G group] ...\n ", stderr);
1524 fputs("[-T [from_date][,to_date]] ... ", stderr);
1525 fputs(" [pattern ...]\n", stderr);
1526 fputs(" pax -w [-dituvzHLPX] [-b blocksize] ", stderr);
1527 fputs("[ [-a] [-f archive] ] [-x format] \n", stderr);
1528 fputs(" [-B bytes] [-s replstr] ... ", stderr);
1529 fputs("[-o options] ... [-U user] ...", stderr);
1530 fputs("\n [-G group] ... ", stderr);
1531 fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr);
1532 fputs("[file ...]\n", stderr);
1533 fputs(" pax -r -w [-diklntuvDHLPXYZ] ", stderr);
1534 fputs("[-p string] ... [-s replstr] ...", stderr);
1535 fputs("\n [-U user] ... [-G group] ... ", stderr);
1536 fputs("[-T [from_date][,to_date][/[c][m]]] ... ", stderr);
1537 fputs("\n [file ...] directory\n", stderr);
1543 * print the usage summary to the user
1549 fputs("usage: tar [-]{crtux}[-befhjmopqsvwyzHLOPXZ014578] [blocksize] ",
1551 fputs("[archive] [replstr] [-C directory] [-I file] [file ...]\n",
1558 * print the usage summary to the user
1564 fputs("usage: cpio -o [-aABcLvVzZ] [-C bytes] [-H format] [-O archive]\n", stderr);
1565 fputs(" [-F archive] < name-list [> archive]\n", stderr);
1566 fputs(" cpio -i [-bBcdfmnrsStuvVzZ6] [-C bytes] [-E file] [-H format]\n", stderr);
1567 fputs(" [-I archive] [-F archive] [pattern...] [< archive]\n", stderr);
1568 fputs(" cpio -p [-adlLmuvV] destination-directory < name-list\n", stderr);