head 1.10; access; symbols libarchive-3-8-8:1.1.1.12 pkgsrc-2026Q2:1.10.0.14 pkgsrc-2026Q2-base:1.10 libarchive-3-8-7:1.1.1.12 libarchive-3-8-6:1.1.1.12 pkgsrc-2026Q1:1.10.0.12 pkgsrc-2026Q1-base:1.10 libarchive-3-8-5:1.1.1.12 libarchive-3-8-4:1.1.1.12 pkgsrc-2025Q4:1.10.0.10 pkgsrc-2025Q4-base:1.10 libarchive-3-8-3:1.1.1.12 libarchive-3-8-2:1.1.1.12 pkgsrc-2025Q3:1.10.0.8 pkgsrc-2025Q3-base:1.10 libarchive-3-8-1:1.1.1.12 pkgsrc-2025Q2:1.10.0.6 pkgsrc-2025Q2-base:1.10 libarchive-3-8-0:1.1.1.12 libarchive-3-7-9:1.1.1.12 pkgsrc-2025Q1:1.10.0.4 pkgsrc-2025Q1-base:1.10 pkgsrc-2024Q4:1.10.0.2 pkgsrc-2024Q4-base:1.10 libarchive-3-7-7:1.1.1.12 pkgsrc-2024Q3:1.9.0.6 pkgsrc-2024Q3-base:1.9 libarchive-3-7-5:1.1.1.11 pkgsrc-2024Q2:1.9.0.4 pkgsrc-2024Q2-base:1.9 libarchive-3-7-4:1.1.1.11 libarchive-3-7-3:1.1.1.11 pkgsrc-2024Q1:1.9.0.2 pkgsrc-2024Q1-base:1.9 libarchive-3-7-2:1.1.1.11 pkgsrc-2023Q4:1.8.0.30 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.8.0.28 pkgsrc-2023Q3-base:1.8 pkgsrc-2023Q2:1.8.0.26 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.24 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.22 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.20 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.18 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.16 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.14 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.12 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.10 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.8 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.6 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.4 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.8.0.2 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.7.0.4 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.6 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.2 pkgsrc-2019Q3-base:1.7 libarchive-3-4-0:1.1.1.10 libarchive-3-3-3:1.1.1.9 pkgsrc-2019Q2:1.6.0.2 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.5.0.16 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.14 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.12 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.10 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.8 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.6 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.4 pkgsrc-2017Q3-base:1.5 libarchive-3-3-2:1.1.1.8 pkgsrc-2017Q2:1.4.0.4 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.2 pkgsrc-2017Q1-base:1.4 libarchive-3-3-1:1.1.1.7 pkgsrc-2016Q4:1.3.0.6 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.4 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.2 pkgsrc-2016Q2-base:1.3 libarchive-3-2-1:1.1.1.6 pkgsrc-2016Q1:1.2.0.10 pkgsrc-2016Q1-base:1.2 pkgsrc-2015Q4:1.2.0.8 pkgsrc-2015Q4-base:1.2 pkgsrc-2015Q3:1.2.0.6 pkgsrc-2015Q3-base:1.2 pkgsrc-2015Q2:1.2.0.4 pkgsrc-2015Q2-base:1.2 pkgsrc-2015Q1:1.2.0.2 pkgsrc-2015Q1-base:1.2 pkgsrc-2014Q4:1.1.1.5.0.36 pkgsrc-2014Q4-base:1.1.1.5 pkgsrc-2014Q3:1.1.1.5.0.34 pkgsrc-2014Q3-base:1.1.1.5 pkgsrc-2014Q2:1.1.1.5.0.32 pkgsrc-2014Q2-base:1.1.1.5 pkgsrc-2014Q1:1.1.1.5.0.30 pkgsrc-2014Q1-base:1.1.1.5 pkgsrc-2013Q4:1.1.1.5.0.28 pkgsrc-2013Q4-base:1.1.1.5 pkgsrc-2013Q3:1.1.1.5.0.26 pkgsrc-2013Q3-base:1.1.1.5 pkgsrc-2013Q2:1.1.1.5.0.24 pkgsrc-2013Q2-base:1.1.1.5 pkgsrc-2013Q1:1.1.1.5.0.22 pkgsrc-2013Q1-base:1.1.1.5 pkgsrc-2012Q4:1.1.1.5.0.20 pkgsrc-2012Q4-base:1.1.1.5 pkgsrc-2012Q3:1.1.1.5.0.18 pkgsrc-2012Q3-base:1.1.1.5 pkgsrc-2012Q2:1.1.1.5.0.16 pkgsrc-2012Q2-base:1.1.1.5 pkgsrc-2012Q1:1.1.1.5.0.14 pkgsrc-2012Q1-base:1.1.1.5 pkgsrc-2011Q4:1.1.1.5.0.12 pkgsrc-2011Q4-base:1.1.1.5 pkgsrc-2011Q3:1.1.1.5.0.10 pkgsrc-2011Q3-base:1.1.1.5 pkgsrc-2011Q2:1.1.1.5.0.8 pkgsrc-2011Q2-base:1.1.1.5 pkgsrc-2011Q1:1.1.1.5.0.6 pkgsrc-2011Q1-base:1.1.1.5 pkgsrc-2010Q4:1.1.1.5.0.4 pkgsrc-2010Q4-base:1.1.1.5 pkgsrc-2010Q3:1.1.1.5.0.2 pkgsrc-2010Q3-base:1.1.1.5 libarchive-2-8-4:1.1.1.5 pkgsrc-2010Q2:1.1.1.4.0.4 pkgsrc-2010Q2-base:1.1.1.4 pkgsrc-2010Q1:1.1.1.4.0.2 pkgsrc-2010Q1-base:1.1.1.4 libarchive-2-8-3:1.1.1.4 libarchive-2-8-2:1.1.1.3 libarchive-2-8-0:1.1.1.2 pkgsrc-2009Q4:1.1.1.1.0.22 pkgsrc-2009Q4-base:1.1.1.1 pkgsrc-2009Q3:1.1.1.1.0.20 pkgsrc-2009Q3-base:1.1.1.1 pkgsrc-2009Q2:1.1.1.1.0.18 pkgsrc-2009Q2-base:1.1.1.1 pkgsrc-2009Q1:1.1.1.1.0.16 pkgsrc-2009Q1-base:1.1.1.1 pkgsrc-2008Q4:1.1.1.1.0.14 pkgsrc-2008Q4-base:1.1.1.1 pkgsrc-2008Q3:1.1.1.1.0.12 pkgsrc-2008Q3-base:1.1.1.1 cube-native-xorg:1.1.1.1.0.10 cube-native-xorg-base:1.1.1.1 pkgsrc-2008Q2:1.1.1.1.0.8 pkgsrc-2008Q2-base:1.1.1.1 cwrapper:1.1.1.1.0.6 pkgsrc-2008Q1:1.1.1.1.0.4 pkgsrc-2008Q1-base:1.1.1.1 pkgsrc-2007Q4:1.1.1.1.0.2 pkgsrc-2007Q4-base:1.1.1.1 libarchive-2-4-0:1.1.1.1 KIENTZLE:1.1.1; locks; strict; comment @# @; 1.10 date 2024.10.19.05.39.58; author adam; state Exp; branches; next 1.9; commitid fYRSlpIWMYluweuF; 1.9 date 2024.01.18.18.00.16; author adam; state Exp; branches; next 1.8; commitid hNXpsHx3SuHqsXUE; 1.8 date 2020.05.26.09.16.41; author nia; state Exp; branches; next 1.7; commitid nNhsdZACz3PjmJ9C; 1.7 date 2019.09.22.09.55.08; author joerg; state Exp; branches; next 1.6; commitid FdPvRjF4OzwBwZDB; 1.6 date 2019.04.10.08.24.05; author adam; state Exp; branches; next 1.5; commitid LnliQ9ieqYkikMiB; 1.5 date 2017.08.01.22.26.23; author joerg; state Exp; branches; next 1.4; commitid 32clTfkmVE8bPy1A; 1.4 date 2017.02.25.21.11.19; author joerg; state Exp; branches; next 1.3; commitid rW8QfCWrsCO1snHz; 1.3 date 2016.06.20.17.24.57; author joerg; state Exp; branches; next 1.2; commitid ArUvympBjfBseebz; 1.2 date 2015.01.17.12.44.49; author adam; state Exp; branches; next 1.1; commitid yy7e1hLrfmA2pn6y; 1.1 date 2007.11.30.21.25.33; author joerg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2007.11.30.21.25.33; author joerg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.02.20.03.50.05; author joerg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2010.03.14.17.57.22; author joerg; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2010.03.16.17.07.37; author joerg; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2010.07.09.11.53.32; author joerg; state Exp; branches; next 1.1.1.6; 1.1.1.6 date 2016.06.20.17.12.02; author joerg; state Exp; branches; next 1.1.1.7; commitid rRgm3BqbmbI8aebz; 1.1.1.7 date 2017.02.25.20.54.12; author joerg; state Exp; branches; next 1.1.1.8; commitid ReqPI0ibLYjdmnHz; 1.1.1.8 date 2017.08.01.22.21.12; author joerg; state Exp; branches; next 1.1.1.9; commitid XQwPAFJku336Ny1A; 1.1.1.9 date 2019.09.22.09.47.03; author joerg; state Exp; branches; next 1.1.1.10; commitid N0KxAXOYyULduZDB; 1.1.1.10 date 2019.09.22.09.51.33; author joerg; state Exp; branches; next 1.1.1.11; commitid 5kDbfPbiV3INvZDB; 1.1.1.11 date 2024.01.18.17.37.45; author adam; state Exp; branches; next 1.1.1.12; commitid zDULEPUODGjTkXUE; 1.1.1.12 date 2024.10.19.05.27.34; author adam; state Exp; branches; next ; commitid v1iXM4j1Na52seuF; desc @@ 1.10 log @libarchive: updated to 3.7.7 Libarchive 3.7.7 is a bugfix and security release Security fixes: gzip: prevent a hang when processing a malformed gzip inside a gzip tar: don't crash on truncated tar archives tar: fix two leaks in tar header parsing Important bugfixes: 7-zip: read/write symlink paths as UTF-8 cpio: exit with an error code if an entry could not be extracted rar5: report encrypted entries tar: fix truncation of entry pathnames in specific archives windows: fix ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS Libarchive 3.7.6 is a bugfix and security release. This release fixes a tar regression introduced in libarchive 3.7.5 Important bugfixes. tar: clean up linkpath between entries tar: fix memory leaks when processing symlinks or parsing pax headers iso: be more cautious about parsing ISO-9660 timestamps @ text @4mCPIO24m(1) General Commands Manual 4mCPIO24m(1) 1mNAME0m cpio — copy files to and from archives 1mSYNOPSIS0m 1mcpio -i 22m[4moptions24m] [4mpattern24m 4m...24m] [4m<24m 4marchive24m] 1mcpio -o 22m[4moptions24m] 4m<24m 4mname-list24m [4m>24m 4marchive24m] 1mcpio -p 22m[4moptions24m] 4mdest-dir24m 4m<24m 4mname-list0m 1mDESCRIPTION0m 1mcpio 22mcopies files between archives and directories. This implementa‐ tion can extract from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, and shar archives. The first option to 1mcpio 22mis a mode indicator from the following list: 1m-i 22mInput. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the 1m-t 22moption is speci‐ fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. 1m-o 22mOutput. Read a list of filenames from standard input and pro‐ duce a new archive on standard output (unless overridden) con‐ taining the specified items. 1m-p 22mPass-through. Read a list of filenames from standard input and copy the files to the specified directory. 1mOPTIONS0m Unless specifically stated otherwise, options are applicable in all op‐ erating modes. 1m-022m, 1m--null0m Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con‐ tain newlines. 1m-622m, 1m--pwb0m When reading a binary format archive, assume it's the earlier one, from the PWB variant of 6th Edition UNIX. When writing a cpio archive, use the PWB format. 1m-722m, 1m--binary0m (o mode only) When writing a cpio archive, use the (newer, non- PWB) binary format. 1m-A 22m(o mode only) Append to the specified archive. (Not yet imple‐ mented.) 1m-a 22m(o and p modes) Reset access times on files after they are read. 1m-B 22m(o mode only) Block output to records of 5120 bytes. 1m-C 4m22msize0m (o mode only) Block output to records of 4msize24m bytes. 1m-c 22m(o mode only) Use the old POSIX portable character format. Equivalent to 1m--format 4m22modc24m. 1m-d22m, 1m--make-directories0m (i and p modes) Create directories as necessary. 1m-E 4m22mfile0m (i mode only) Read list of file name patterns from 4mfile24m to list and extract. 1m-F 4m22mfile24m, 1m--file 4m22mfile0m Read archive from or write archive to 4mfile24m. 1m-f 4m22mpattern0m (i mode only) Ignore files that match 4mpattern24m. 1m-H 4m22mformat24m, 1m--format 4m22mformat0m (o mode only) Produce the output archive in the specified for‐ mat. Supported formats include: 4mcpio24m Synonym for 4modc24m. 4mnewc24m The SVR4 portable cpio format. 4modc24m The old POSIX.1 portable octet-oriented cpio format. 4mpax24m The POSIX.1 pax format, an extension of the ustar for‐ mat. 4mustar24m The POSIX.1 tar format. The default format is 4modc24m. See 4mlibarchive-formats24m(5) for more complete information about the formats currently supported by the underlying 4mlibarchive24m(3) library. 1m-h22m, 1m--help0m Print usage information. 1m-I 4m22mfile0m Read archive from 4mfile24m. 1m-i22m, 1m--extract0m Input mode. See above for description. 1m--insecure0m (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links, ab‐ solute paths, and path names containing ‘..’ in the name. 1m-J22m, 1m--xz0m (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input. 1m-j 22mSynonym for 1m-y22m. 1m-L 22m(o and p modes) All symbolic links will be followed. Normally, symbolic links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead. 1m-l22m, 1m--link0m (p mode only) Create links from the target directory to the original files, instead of copying. 1m--lrzip0m (o mode only) Compress the resulting archive with 4mlrzip24m(1). In input mode, this option is ignored. 1m--lz4 22m(o mode only) Compress the archive with lz4-compatible compres‐ sion before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input. 1m--zstd 22m(o mode only) Compress the archive with zstd-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; zstd compression is recognized automatically on input. 1m--lzma 22m(o mode only) Compress the file with lzma-compatible compres‐ sion before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. 1m--lzop 22m(o mode only) Compress the resulting archive with 4mlzop24m(1). In input mode, this option is ignored. 1m--passphrase 4m22mpassphrase0m The 4mpassphrase24m is used to extract or create an encrypted archive. Currently, zip is only a format that 1mcpio 22mcan handle encrypted archives. You shouldn't use this option unless you realize how insecure use of this option is. 1m-m22m, 1m--preserve-modification-time0m (i and p modes) Set file modification time on created files to match those in the source. 1m-n22m, 1m--numeric-uid-gid0m (i mode, only with 1m-t22m) Display numeric uid and gid. By de‐ fault, 1mcpio 22mdisplays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. 1m--no-preserve-owner0m (i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users. 1m-O 4m22mfile0m Write archive to 4mfile24m. 1m-o22m, 1m--create0m Output mode. See above for description. 1m-p22m, 1m--pass-through0m Pass-through mode. See above for description. 1m--preserve-owner0m (i mode only) Restore file ownership. This is the default when run by the root user. 1m--quiet0m Suppress unnecessary messages. 1m-R 22m[user][:][group], 1m--owner 22m[user][:][group] Set the owner and/or group on files in the output. If group is specified with no user (for example, 1m-R 4m22m:wheel24m) then the group will be set but not the user. If the user is specified with a trailing colon and no group (for example, 1m-R 4m22mroot:24m) then the group will be set to the user's default group. If the user is specified with no trailing colon, then the user will be set but not the group. In 1m-i 22mand 1m-p 22mmodes, this option can only be used by the super-user. (For compatibility, a period can be used in place of the colon.) 1m-r 22m(All modes.) Rename files interactively. For each file, a prompt is written to 4m/dev/tty24m containing the name of the file and a line is read from 4m/dev/tty24m. If the line read is blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file. 1m-t22m, 1m--list0m (i mode only) List the contents of the archive to stdout; do not restore the contents to disk. 1m-u22m, 1m--unconditional0m (i and p modes) Unconditionally overwrite existing files. Or‐ dinarily, an older file will not overwrite a newer file on disk. 1m-V22m, 1m--dot0m Print a dot to stderr for each file as it is processed. Super‐ seded by 1m-v22m. 1m-v22m, 1m--verbose0m Print the name of each file to stderr as it is processed. With 1m-t22m, provide a detailed listing of each file. 1m--version0m Print the program version information and exit. 1m-y 22m(o mode only) Compress the archive with bzip2-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; bzip2 compression is recognized automatically on input. 1m-Z 22m(o mode only) Compress the archive with compress-compatible compression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. 1m-z 22m(o mode only) Compress the archive with gzip-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; gzip compression is recognized automatically on input. 1mEXIT STATUS0m The 1mcpio 22mutility exits 0 on success, and >0 if an error occurs. 1mENVIRONMENT0m The following environment variables affect the execution of 1mcpio22m: LANG The locale to use. See 4menviron24m(7) for more information. TZ The timezone to use when displaying dates. See 4menviron24m(7) for more information. 1mEXAMPLES0m The 1mcpio 22mcommand is traditionally used to copy file hierarchies in con‐ junction with the 4mfind24m(1) command. The first example here simply copies all files from 4msrc24m to 4mdest24m: 1mfind 4m22msrc24m | 1mcpio -pmud 4m22mdest0m By carefully selecting options to the 4mfind24m(1) command and combining it with other standard utilities, it is possible to exercise very fine control over which files are copied. This next example copies files from 4msrc24m to 4mdest24m that are more than 2 days old and whose names match a particular pattern: 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mgrep foo[bar] 22m| 1mcpio -pdmu 4m22mdest0m This example copies files from 4msrc24m to 4mdest24m that are more than 2 days old and which contain the word “foobar”: 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mxargs grep -l foobar 22m| 1mcpio -pdmu 4m22mdest0m 1mCOMPATIBILITY0m The mode options i, o, and p and the options a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2. The old POSIX.1 standard specified that only 1m-i22m, 1m-o22m, and 1m-p 22mwere inter‐ preted as command-line options. Each took a single argument of a list of modifier characters. For example, the standard syntax allows 1m-imu0m but does not support 1m-miu 22mor 1m-i -m -u22m, since 4mm24m and 4mu24m are only modifiers to 1m-i22m, they are not command-line options in their own right. The syn‐ tax supported by this implementation is backwards-compatible with the standard. For best compatibility, scripts should limit themselves to the standard syntax. 1mSEE ALSO0m 4mbzip224m(1), 4mgzip24m(1), 4mmt24m(1), 4mpax24m(1), 4mtar24m(1), 4mlibarchive24m(3), 4mcpio24m(5), 4mlibarchive-formats24m(5), 4mtar24m(5) 1mSTANDARDS0m There is no current POSIX standard for the cpio command; it appeared in ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). The cpio, ustar, and pax interchange file formats are defined by IEEE Std 1003.1-2001 (“POSIX.1”) for the pax command. 1mHISTORY0m The original 1mcpio 22mand 1mfind 22mutilities were written by Dick Haight while working in AT&T's Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use within AT&T. They were first released outside of AT&T as part of Sys‐ tem III Unix in 1981. As a result, 1mcpio 22mactually predates 1mtar22m, even though it was not well-known outside of AT&T until some time later. This is a complete re-implementation based on the 4mlibarchive24m(3) li‐ brary. 1mBUGS0m The cpio archive format has several basic limitations: It does not store user and group names, only numbers. As a result, it cannot be reliably used to transfer files between systems with dissimilar user and group numbering. Older cpio formats limit the user and group num‐ bers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive formats cannot support files over 4 gigabytes, except for the “odc” variant, which can support files up to 8 gigabytes. Debian September 16, 2014 4mCPIO24m(1) @ 1.9 log @libarchive: updated to 3.7.2 Libarchive 3.7.2 is a security, bugfix and feature release. Security fixes: Multiple vulnerabilities have been fixed in the PAX writer (1b4e0d0) Important bugfixes: bsdunzip(1) now correctly handles arguments following an -x after the zipfile New features: bsdunzip(1) now supports the "--version" flag 7-zip reader now translates Windows permissions into UNIX permissions uudecode filter in raw mode now supports file name and file mode zstd filter now supports the "long" write option Libarchive 3.7.1 is a security, feature and bugfix release. Security fixes: SEGV and stack buffer overflow in verbose mode of cpio Feature updates: bsdunzip updated to match latest upstream code Important bugfixes: miscellaneous functional bugfixes build fixes on multiple platforms Libarchive 3.7.0 is a feature and bugfix release. New features: bsdunzip: new tool ported from FreeBSD drop-in replacement for Info-ZIP unzip, not yet ported for Windows 7zip reader: support for Zstandard compression 7zip reader: support for ARM64 filter zstd filter: support for multi-frame zstd archives Other notable bugfixes and improvements: pax: fix year 2038 problem on platforms with 64-bit time_t Windows: Universal Windows Platform (UWP) fixes and improvements Windows: bcrypt usage fixes and improvements Windows: time function usage fixes and improvements @ text @d1 1 a1 1 CPIO(1) BSD General Commands Manual CPIO(1) d3 2 a4 2 NAME cpio — copy files to and from archives d6 289 a294 286 SYNOPSIS cpio -i [options] [pattern ...] [< archive] cpio -o [options] < name-list [> archive] cpio -p [options] dest-dir < name-list DESCRIPTION cpio copies files between archives and directories. This implementation can extract from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, and shar archives. The first option to cpio is a mode indicator from the following list: -i Input. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the -t option is speci‐ fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. -o Output. Read a list of filenames from standard input and produce a new archive on standard output (unless overridden) containing the specified items. -p Pass-through. Read a list of filenames from standard input and copy the files to the specified directory. OPTIONS Unless specifically stated otherwise, options are applicable in all oper‐ ating modes. -0, --null Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con‐ tain newlines. -6, --pwb When reading a binary format archive, assume it's the earlier one, from the PWB variant of 6th Edition UNIX. When writing a cpio archive, use the PWB format. -7, --binary (o mode only) When writing a cpio archive, use the (newer, non- PWB) binary format. -A (o mode only) Append to the specified archive. (Not yet imple‐ mented.) -a (o and p modes) Reset access times on files after they are read. -B (o mode only) Block output to records of 5120 bytes. -C size (o mode only) Block output to records of size bytes. -c (o mode only) Use the old POSIX portable character format. Equivalent to --format odc. -d, --make-directories (i and p modes) Create directories as necessary. -E file (i mode only) Read list of file name patterns from file to list and extract. -F file, --file file Read archive from or write archive to file. -f pattern (i mode only) Ignore files that match pattern. -H format, --format format (o mode only) Produce the output archive in the specified format. Supported formats include: cpio Synonym for odc. newc The SVR4 portable cpio format. odc The old POSIX.1 portable octet-oriented cpio format. pax The POSIX.1 pax format, an extension of the ustar for‐ mat. ustar The POSIX.1 tar format. The default format is odc. See libarchive-formats(5) for more complete information about the formats currently supported by the underlying libarchive(3) library. -h, --help Print usage information. -I file Read archive from file. -i, --extract Input mode. See above for description. --insecure (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links, absolute paths, and path names containing ‘..’ in the name. -J, --xz (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input. -j Synonym for -y. -L (o and p modes) All symbolic links will be followed. Normally, symbolic links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead. -l, --link (p mode only) Create links from the target directory to the orig‐ inal files, instead of copying. --lrzip (o mode only) Compress the resulting archive with lrzip(1). In input mode, this option is ignored. --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ sion before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input. --zstd (o mode only) Compress the archive with zstd-compatible compres‐ sion before writing it. In input mode, this option is ignored; zstd compression is recognized automatically on input. --lzma (o mode only) Compress the file with lzma-compatible compression before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. --lzop (o mode only) Compress the resulting archive with lzop(1). In input mode, this option is ignored. --passphrase passphrase The passphrase is used to extract or create an encrypted archive. Currently, zip is only a format that cpio can handle encrypted archives. You shouldn't use this option unless you realize how insecure use of this option is. -m, --preserve-modification-time (i and p modes) Set file modification time on created files to match those in the source. -n, --numeric-uid-gid (i mode, only with -t) Display numeric uid and gid. By default, cpio displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. --no-preserve-owner (i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users. -O file Write archive to file. -o, --create Output mode. See above for description. -p, --pass-through Pass-through mode. See above for description. --preserve-owner (i mode only) Restore file ownership. This is the default when run by the root user. --quiet Suppress unnecessary messages. -R [user][:][group], --owner [user][:][group] Set the owner and/or group on files in the output. If group is specified with no user (for example, -R :wheel) then the group will be set but not the user. If the user is specified with a trailing colon and no group (for example, -R root:) then the group will be set to the user's default group. If the user is specified with no trailing colon, then the user will be set but not the group. In -i and -p modes, this option can only be used by the super-user. (For compatibility, a period can be used in place of the colon.) -r (All modes.) Rename files interactively. For each file, a prompt is written to /dev/tty containing the name of the file and a line is read from /dev/tty. If the line read is blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file. -t, --list (i mode only) List the contents of the archive to stdout; do not restore the contents to disk. -u, --unconditional (i and p modes) Unconditionally overwrite existing files. Ordi‐ narily, an older file will not overwrite a newer file on disk. -V, --dot Print a dot to stderr for each file as it is processed. Super‐ seded by -v. -v, --verbose Print the name of each file to stderr as it is processed. With -t, provide a detailed listing of each file. --version Print the program version information and exit. -y (o mode only) Compress the archive with bzip2-compatible compres‐ sion before writing it. In input mode, this option is ignored; bzip2 compression is recognized automatically on input. -Z (o mode only) Compress the archive with compress-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; compression is recognized automatically on input. -z (o mode only) Compress the archive with gzip-compatible compres‐ sion before writing it. In input mode, this option is ignored; gzip compression is recognized automatically on input. EXIT STATUS The cpio utility exits 0 on success, and >0 if an error occurs. ENVIRONMENT The following environment variables affect the execution of cpio: LANG The locale to use. See environ(7) for more information. TZ The timezone to use when displaying dates. See environ(7) for more information. EXAMPLES The cpio command is traditionally used to copy file hierarchies in con‐ junction with the find(1) command. The first example here simply copies all files from src to dest: find src | cpio -pmud dest By carefully selecting options to the find(1) command and combining it with other standard utilities, it is possible to exercise very fine con‐ trol over which files are copied. This next example copies files from src to dest that are more than 2 days old and whose names match a partic‐ ular pattern: find src -mtime +2 | grep foo[bar] | cpio -pdmu dest This example copies files from src to dest that are more than 2 days old and which contain the word “foobar”: find src -mtime +2 | xargs grep -l foobar | cpio -pdmu dest COMPATIBILITY The mode options i, o, and p and the options a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2. The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ preted as command-line options. Each took a single argument of a list of modifier characters. For example, the standard syntax allows -imu but does not support -miu or -i -m -u, since m and u are only modifiers to -i, they are not command-line options in their own right. The syntax supported by this implementation is backwards-compatible with the stan‐ dard. For best compatibility, scripts should limit themselves to the standard syntax. SEE ALSO bzip2(1), gzip(1), mt(1), pax(1), tar(1), libarchive(3), cpio(5), libarchive-formats(5), tar(5) STANDARDS There is no current POSIX standard for the cpio command; it appeared in ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). The cpio, ustar, and pax interchange file formats are defined by IEEE Std 1003.1-2001 (“POSIX.1”) for the pax command. HISTORY The original cpio and find utilities were written by Dick Haight while working in AT&T's Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use within AT&T. They were first released outside of AT&T as part of System III Unix in 1981. As a result, cpio actually predates tar, even though it was not well-known outside of AT&T until some time later. This is a complete re-implementation based on the libarchive(3) library. BUGS The cpio archive format has several basic limitations: It does not store user and group names, only numbers. As a result, it cannot be reliably used to transfer files between systems with dissimilar user and group numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for‐ mats cannot support files over 4 gigabytes, except for the “odc” variant, which can support files up to 8 gigabytes. d296 1 a296 1 BSD September 16, 2014 BSD @ 1.8 log @libarchive: Update to 3.4.3 Libarchive 3.4.3 is a feature and bugfix release. New features: support for pzstd compressed files (#1357) support for RHT.security.selinux tar extended attribute (#1348) Important bugfixes: various zstd fixes and improvements (#1342 #1352 #1359) child process handling fixes (#1372) Libarchive 3.4.2 is a feature and security release. New features: support for atomic file extraction (bsdtar -x --safe-writes) (#1289) support for mbed TLS (PolarSSL) (#1301) Important bugfixes: security fixes in RAR5 reader (#1280 #1326) compression buffer fix in XAR writer (#1317) fix uname and gname longer than 32 characters in PAX writer (#1319) fix segfault when archiving hard links in ISO9660 and XAR writers (#1325) fix support for extracting 7z archive entries with Delta filter (#987) Libarchive 3.4.1 is a feature and security release. New features: Unicode filename support for reading lha/lzh archives New pax write option "xattrhdr" Important bugfixes: security fixes in wide string processing (#1276 #1298) security fixes in RAR5 reader (#1212 #1217 #1296) security fixes and optimizations to write filter logic (#351) security fix related to use of readlink(2) (1dae5a5) sparse file handling fixes (#1218 #1260) Thanks to all contributors and bug reporters. Special thanks to Christos Zoulas (@@zoulasc) from NetBSD for the atomic file extraction feature. @ text @d1 1 a1 1 CPIO(1) BSD General Commands Manual CPIO(1) d4 1 a4 1 cpio -- copy files to and from archives d17 2 a18 2 -i Input. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the -t option is speci- d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d29 1 a29 1 Unless specifically stated otherwise, options are applicable in all oper- d34 1 a34 1 This is necessary if any of the filenames being read might con- d37 10 a46 1 -A (o mode only) Append to the specified archive. (Not yet imple- d49 1 a49 1 -a (o and p modes) Reset access times on files after they are read. d51 1 a51 1 -B (o mode only) Block output to records of 5120 bytes. d56 1 a56 1 -c (o mode only) Use the old POSIX portable character format. d79 1 a79 1 pax The POSIX.1 pax format, an extension of the ustar for- d83 1 a83 1 The default format is odc. See libarchive-formats(5) for more d99 1 a99 1 paths, and path names containing '..' in the name. d103 1 a103 1 before writing it. In input mode, this option is ignored; xz d106 1 a106 1 -j Synonym for -y. d108 1 a108 1 -L (o and p modes) All symbolic links will be followed. Normally, d114 1 a114 1 (p mode only) Create links from the target directory to the orig- d121 1 a121 1 --lz4 (o mode only) Compress the archive with lz4-compatible compres- d125 1 a125 1 --zstd (o mode only) Compress the archive with zstd-compatible compres- d130 1 a130 1 before writing it. In input mode, this option is ignored; lzma d133 1 a133 1 --lzop (o mode only) Compress the resulting archive with lzop(1). In d163 1 a163 1 Pass-through mode. See above for description. d173 1 a173 1 Set the owner and/or group on files in the output. If group is d180 1 a180 1 by the super-user. (For compatibility, a period can be used in d183 1 a183 1 -r (All modes.) Rename files interactively. For each file, a d195 1 a195 1 (i and p modes) Unconditionally overwrite existing files. Ordi- d199 1 a199 1 Print a dot to stderr for each file as it is processed. Super- d209 1 a209 1 -y (o mode only) Compress the archive with bzip2-compatible compres- d213 3 a215 3 -Z (o mode only) Compress the archive with compress-compatible com- pression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. d217 1 a217 1 -z (o mode only) Compress the archive with gzip-compatible compres- d229 1 a229 1 TZ The timezone to use when displaying dates. See environ(7) for d233 2 a234 2 The cpio command is traditionally used to copy file hierarchies in con- junction with the find(1) command. The first example here simply copies d239 1 a239 1 with other standard utilities, it is possible to exercise very fine con- d241 1 a241 1 src to dest that are more than 2 days old and whose names match a partic- d246 1 a246 1 and which contain the word ``foobar'': d253 1 a253 1 The old POSIX.1 standard specified that only -i, -o, and -p were inter- d258 1 a258 1 supported by this implementation is backwards-compatible with the stan- d268 2 a269 2 ISO/IEC 9945-1:1996 (``POSIX.1'') but was dropped from IEEE Std 1003.1-2001 (``POSIX.1''). d272 1 a272 1 1003.1-2001 (``POSIX.1'') for the pax command. d277 1 a277 1 PWB/UNIX 1.0, the ``Programmer's Work Bench'' system developed for use d288 4 a291 4 numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for- mats cannot support files over 4 gigabytes, except for the ``odc'' vari- ant, which can support files up to 8 gigabytes. @ 1.7 log @Update for libarchive-3.4.0: - improvements for Android APK and JAR archives - better support for non-recursive list and extract - tar --exclude-vcs support - fixes for file attributes and flags handling - zipx support - rar 5.0 reader @ text @d4 1 a4 1 cpio — copy files to and from archives d18 1 a18 1 and extract the contents to disk or (if the -t option is speci‐ d29 1 a29 1 Unless specifically stated otherwise, options are applicable in all oper‐ d34 1 a34 1 This is necessary if any of the filenames being read might con‐ d37 1 a37 1 -A (o mode only) Append to the specified archive. (Not yet imple‐ d70 1 a70 1 pax The POSIX.1 pax format, an extension of the ustar for‐ d90 1 a90 1 paths, and path names containing ‘..’ in the name. d105 1 a105 1 (p mode only) Create links from the target directory to the orig‐ d112 1 a112 1 --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ d116 1 a116 1 --zstd (o mode only) Compress the archive with zstd-compatible compres‐ d186 1 a186 1 (i and p modes) Unconditionally overwrite existing files. Ordi‐ d190 1 a190 1 Print a dot to stderr for each file as it is processed. Super‐ d200 1 a200 1 -y (o mode only) Compress the archive with bzip2-compatible compres‐ d204 3 a206 3 -Z (o mode only) Compress the archive with compress-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; compression is recognized automatically on input. d208 1 a208 1 -z (o mode only) Compress the archive with gzip-compatible compres‐ d224 1 a224 1 The cpio command is traditionally used to copy file hierarchies in con‐ d230 1 a230 1 with other standard utilities, it is possible to exercise very fine con‐ d232 1 a232 1 src to dest that are more than 2 days old and whose names match a partic‐ d237 1 a237 1 and which contain the word “foobar”: d244 1 a244 1 The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ d249 1 a249 1 supported by this implementation is backwards-compatible with the stan‐ d254 1 a254 1 bzip2(1), tar(1), gzip(1), mt(1), pax(1), libarchive(3), cpio(5), d259 2 a260 2 ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). d263 1 a263 1 1003.1-2001 (“POSIX.1”) for the pax command. d268 1 a268 1 PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use d280 3 a282 3 18 bits, which is insufficient for modern systems. The cpio archive for‐ mats cannot support files over 4 gigabytes, except for the “odc” variant, which can support files up to 8 gigabytes. @ 1.6 log @libarchive: updated to 3.3.3 libarchive 3.3.3: Avoid super-linear slowdown on malformed mtree files Many fixes for building with Visual Studio NO_OVERWRITE doesn't change existing directory attributes New support for Zstandard read and write filters @ text @d205 2 a206 2 pression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. @ 1.5 log @Merge for libarchive-3.3.2. @ text @d116 4 @ 1.4 log @Merge libarchive-3.3.1. @ text @d3 2 a4 2 1mNAME0m 1mcpio 22m— copy files to and from archives d6 4 a9 4 1mSYNOPSIS0m 1mcpio -i 22m[4moptions24m] [4mpattern24m 4m...24m] [4m<24m 4marchive24m] 1mcpio -o 22m[4moptions24m] 4m<24m 4mname-list24m [4m>24m 4marchive24m] 1mcpio -p 22m[4moptions24m] 4mdest-dir24m 4m<24m 4mname-list0m d11 2 a12 2 1mDESCRIPTION0m 1mcpio 22mcopies files between archives and directories. This implementation d16 3 a18 3 The first option to 1mcpio 22mis a mode indicator from the following list: 1m-i 22mInput. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the 1m-t 22moption is speci‐ d22 1 a22 1 1m-o 22mOutput. Read a list of filenames from standard input and produce d25 1 a25 1 1m-p 22mPass-through. Read a list of filenames from standard input and d28 1 a28 1 1mOPTIONS0m d32 1 a32 1 1m-022m, 1m--null0m d37 1 a37 1 1m-A 22m(o mode only) Append to the specified archive. (Not yet imple‐ d40 1 a40 1 1m-a 22m(o and p modes) Reset access times on files after they are read. d42 1 a42 1 1m-B 22m(o mode only) Block output to records of 5120 bytes. d44 2 a45 2 1m-C 4m22msize0m (o mode only) Block output to records of 4msize24m bytes. d47 2 a48 2 1m-c 22m(o mode only) Use the old POSIX portable character format. Equivalent to 1m--format 4m22modc24m. d50 1 a50 1 1m-d22m, 1m--make-directories0m d53 2 a54 2 1m-E 4m22mfile0m (i mode only) Read list of file name patterns from 4mfile24m to list d57 2 a58 2 1m-F 4m22mfile24m, 1m--file 4m22mfile0m Read archive from or write archive to 4mfile24m. d60 2 a61 2 1m-f 4m22mpattern0m (i mode only) Ignore files that match 4mpattern24m. d63 1 a63 1 1m-H 4m22mformat24m, 1m--format 4m22mformat0m d67 4 a70 4 4mcpio24m Synonym for 4modc24m. 4mnewc24m The SVR4 portable cpio format. 4modc24m The old POSIX.1 portable octet-oriented cpio format. 4mpax24m The POSIX.1 pax format, an extension of the ustar for‐ d72 1 a72 1 4mustar24m The POSIX.1 tar format. d74 1 a74 1 The default format is 4modc24m. See libarchive-formats(5) for more d78 1 a78 1 1m-h22m, 1m--help0m d81 2 a82 2 1m-I 4m22mfile0m Read archive from 4mfile24m. d84 1 a84 1 1m-i22m, 1m--extract0m d87 1 a87 1 1m--insecure0m d92 1 a92 1 1m-J22m, 1m--xz0m d97 1 a97 1 1m-j 22mSynonym for 1m-y22m. d99 1 a99 1 1m-L 22m(o and p modes) All symbolic links will be followed. Normally, d104 1 a104 1 1m-l22m, 1m--link0m d108 1 a108 1 1m--lrzip0m d112 1 a112 1 1m--lz4 22m(o mode only) Compress the archive with lz4-compatible compres‐ d116 1 a116 1 1m--lzma 22m(o mode only) Compress the file with lzma-compatible compression d120 1 a120 1 1m--lzop 22m(o mode only) Compress the resulting archive with lzop(1). In d123 3 a125 3 1m--passphrase 4m22mpassphrase0m The 4mpassphrase24m is used to extract or create an encrypted archive. Currently, zip is only a format that 1mcpio 22mcan handle encrypted d129 1 a129 1 1m-m22m, 1m--preserve-modification-time0m d133 3 a135 3 1m-n22m, 1m--numeric-uid-gid0m (i mode, only with 1m-t22m) Display numeric uid and gid. By default, 1mcpio 22mdisplays the user and group names when they are provided in d139 1 a139 1 1m--no-preserve-owner0m d143 2 a144 2 1m-O 4m22mfile0m Write archive to 4mfile24m. d146 1 a146 1 1m-o22m, 1m--create0m d149 1 a149 1 1m-p22m, 1m--pass-through0m d152 1 a152 1 1m--preserve-owner0m d156 1 a156 1 1m--quiet0m d159 1 a159 1 1m-R 22m[user][:][group], 1m--owner 22m[user][:][group] d161 1 a161 1 specified with no user (for example, 1m-R 4m22m:wheel24m) then the group d163 1 a163 1 trailing colon and no group (for example, 1m-R 4m22mroot:24m) then the d166 1 a166 1 not the group. In 1m-i 22mand 1m-p 22mmodes, this option can only be used d170 3 a172 3 1m-r 22m(All modes.) Rename files interactively. For each file, a prompt is written to 4m/dev/tty24m containing the name of the file and a line is read from 4m/dev/tty24m. If the line read is blank, the d177 1 a177 1 1m-t22m, 1m--list0m d181 1 a181 1 1m-u22m, 1m--unconditional0m d185 1 a185 1 1m-V22m, 1m--dot0m d187 1 a187 1 seded by 1m-v22m. d189 1 a189 1 1m-v22m, 1m--verbose0m d191 1 a191 1 1m-t22m, provide a detailed listing of each file. d193 1 a193 1 1m--version0m d196 1 a196 1 1m-y 22m(o mode only) Compress the archive with bzip2-compatible compres‐ d200 1 a200 1 1m-Z 22m(o mode only) Compress the archive with compress-compatible com‐ d204 1 a204 1 1m-z 22m(o mode only) Compress the archive with gzip-compatible compres‐ d208 2 a209 2 1mEXIT STATUS0m The 1mcpio 22mutility exits 0 on success, and >0 if an error occurs. d211 2 a212 2 1mENVIRONMENT0m The following environment variables affect the execution of 1mcpio22m: d219 2 a220 2 1mEXAMPLES0m The 1mcpio 22mcommand is traditionally used to copy file hierarchies in con‐ d222 2 a223 2 all files from 4msrc24m to 4mdest24m: 1mfind 4m22msrc24m | 1mcpio -pmud 4m22mdest0m d228 1 a228 1 4msrc24m to 4mdest24m that are more than 2 days old and whose names match a partic‐ d230 1 a230 1 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mgrep foo[bar] 22m| 1mcpio -pdmu 4m22mdest0m d232 1 a232 1 This example copies files from 4msrc24m to 4mdest24m that are more than 2 days old d234 1 a234 1 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mxargs grep -l foobar 22m| 1mcpio -pdmu 4m22mdest0m d236 1 a236 1 1mCOMPATIBILITY0m d240 1 a240 1 The old POSIX.1 standard specified that only 1m-i22m, 1m-o22m, and 1m-p 22mwere inter‐ d242 3 a244 3 modifier characters. For example, the standard syntax allows 1m-imu 22mbut does not support 1m-miu 22mor 1m-i -m -u22m, since 4mm24m and 4mu24m are only modifiers to 1m-i22m, they are not command-line options in their own right. The syntax d249 1 a249 1 1mSEE ALSO0m d253 1 a253 1 1mSTANDARDS0m d261 2 a262 2 1mHISTORY0m The original 1mcpio 22mand 1mfind 22mutilities were written by Dick Haight while d266 1 a266 1 III Unix in 1981. As a result, 1mcpio 22mactually predates 1mtar22m, even though d271 1 a271 1 1mBUGS0m @ 1.3 log @Update for libarchive 3.2.1. @ text @d3 2 a4 2 NAME cpio — copy files to and from archives d6 4 a9 4 SYNOPSIS cpio -i [options] [pattern ...] [< archive] cpio -o [options] < name-list [> archive] cpio -p [options] dest-dir < name-list d11 2 a12 2 DESCRIPTION cpio copies files between archives and directories. This implementation d16 3 a18 3 The first option to cpio is a mode indicator from the following list: -i Input. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the -t option is speci‐ d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d28 1 a28 1 OPTIONS d32 1 a32 1 -0, --null d37 1 a37 1 -A (o mode only) Append to the specified archive. (Not yet imple‐ d40 1 a40 1 -a (o and p modes) Reset access times on files after they are read. d42 1 a42 1 -B (o mode only) Block output to records of 5120 bytes. d44 2 a45 2 -C size (o mode only) Block output to records of size bytes. d47 2 a48 2 -c (o mode only) Use the old POSIX portable character format. Equivalent to --format odc. d50 1 a50 1 -d, --make-directories d53 2 a54 2 -E file (i mode only) Read list of file name patterns from file to list d57 2 a58 2 -F file, --file file Read archive from or write archive to file. d60 2 a61 2 -f pattern (i mode only) Ignore files that match pattern. d63 1 a63 1 -H format, --format format d67 4 a70 4 cpio Synonym for odc. newc The SVR4 portable cpio format. odc The old POSIX.1 portable octet-oriented cpio format. pax The POSIX.1 pax format, an extension of the ustar for‐ d72 1 a72 1 ustar The POSIX.1 tar format. d74 1 a74 1 The default format is odc. See libarchive-formats(5) for more d78 1 a78 1 -h, --help d81 2 a82 2 -I file Read archive from file. d84 1 a84 1 -i, --extract d87 1 a87 1 --insecure d92 1 a92 1 -J, --xz d97 1 a97 1 -j Synonym for -y. d99 1 a99 1 -L (o and p modes) All symbolic links will be followed. Normally, d104 1 a104 1 -l, --link d108 1 a108 1 --lrzip d112 1 a112 1 --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ d116 1 a116 1 --lzma (o mode only) Compress the file with lzma-compatible compression d120 1 a120 1 --lzop (o mode only) Compress the resulting archive with lzop(1). In d123 3 a125 3 --passphrase passphrase The passphrase is used to extract or create an encrypted archive. Currently, zip is only a format that cpio can handle encrypted d129 1 a129 1 -m, --preserve-modification-time d133 3 a135 3 -n, --numeric-uid-gid (i mode, only with -t) Display numeric uid and gid. By default, cpio displays the user and group names when they are provided in d139 1 a139 1 --no-preserve-owner d143 2 a144 2 -O file Write archive to file. d146 1 a146 1 -o, --create d149 1 a149 1 -p, --pass-through d152 1 a152 1 --preserve-owner d156 1 a156 1 --quiet d159 1 a159 1 -R [user][:][group], --owner [user][:][group] d161 1 a161 1 specified with no user (for example, -R :wheel) then the group d163 1 a163 1 trailing colon and no group (for example, -R root:) then the d166 1 a166 1 not the group. In -i and -p modes, this option can only be used d170 3 a172 3 -r (All modes.) Rename files interactively. For each file, a prompt is written to /dev/tty containing the name of the file and a line is read from /dev/tty. If the line read is blank, the d177 1 a177 1 -t, --list d181 1 a181 1 -u, --unconditional d185 1 a185 1 -V, --dot d187 1 a187 1 seded by -v. d189 1 a189 1 -v, --verbose d191 1 a191 1 -t, provide a detailed listing of each file. d193 1 a193 1 --version d196 1 a196 1 -y (o mode only) Compress the archive with bzip2-compatible compres‐ d200 1 a200 1 -Z (o mode only) Compress the archive with compress-compatible com‐ d204 1 a204 1 -z (o mode only) Compress the archive with gzip-compatible compres‐ d208 2 a209 2 EXIT STATUS The cpio utility exits 0 on success, and >0 if an error occurs. d211 2 a212 2 ENVIRONMENT The following environment variables affect the execution of cpio: d219 2 a220 2 EXAMPLES The cpio command is traditionally used to copy file hierarchies in con‐ d222 2 a223 2 all files from src to dest: find src | cpio -pmud dest d228 1 a228 1 src to dest that are more than 2 days old and whose names match a partic‐ d230 1 a230 1 find src -mtime +2 | grep foo[bar] | cpio -pdmu dest d232 1 a232 1 This example copies files from src to dest that are more than 2 days old d234 1 a234 1 find src -mtime +2 | xargs grep -l foobar | cpio -pdmu dest d236 1 a236 1 COMPATIBILITY d240 1 a240 1 The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ d242 3 a244 3 modifier characters. For example, the standard syntax allows -imu but does not support -miu or -i -m -u, since m and u are only modifiers to -i, they are not command-line options in their own right. The syntax d249 1 a249 1 SEE ALSO d253 1 a253 1 STANDARDS d261 2 a262 2 HISTORY The original cpio and find utilities were written by Dick Haight while d266 1 a266 1 III Unix in 1981. As a result, cpio actually predates tar, even though d271 1 a271 1 BUGS @ 1.2 log @Changes 3.1.2: This is a maintenance update to fix issues with the new RAR seeking feature. This new release also contains fixes for build failures when building libarchive using Visual Studio 2012 and MinGW. @ text @d7 3 a9 3 cpio {-i} [options] [pattern ...] [< archive] cpio {-o} [options] < name-list [> archive] cpio {-p} [options] dest-dir < name-list d89 2 a90 2 copying. This allows extraction via symbolic links and path names containing ‘..’ in the name. d112 4 d123 6 d280 1 a280 1 BSD October 7, 2012 BSD @ 1.1 log @Initial revision @ text @d1 1 a1 1 BSDCPIO(1) FreeBSD General Commands Manual BSDCPIO(1) d4 1 a4 1 cpio -- copy files to and from archives d17 5 a21 3 -i Input. Read an archive from standard input and extract the con- tents to disk or (if the -t option is specified) list the con- tents to standard output. d23 2 a24 3 a new archive on standard output containing the specified items. If one or more file patterns are specified, only files matching one of the patterns will be extracted. d29 1 a29 1 Unless specifically stated otherwise, options are applicable in all oper- d32 8 a40 1 (Not yet implemented) d44 3 d50 9 a58 1 -d (i and p modes) Create directories as necessary. d61 1 a61 2 (i mode only) Ignore files that match pattern. (Not yet imple- mented.) d63 1 a63 1 --format format d70 1 a70 1 pax The POSIX.1 pax format, an extension of the ustar for- d74 1 a74 1 The default format is odc. See libarchive_formats(5) for more d78 20 a97 1 -i Input mode. See above for description. d102 1 a102 1 instead. (Not yet implemented.) d104 2 a105 1 -l (p mode only) Create links from the target directory to the orig- d108 13 a120 1 -m (i and p modes) Set file modification time on created files to d123 22 a144 3 -o Output mode. See above for description. -p Pass-through mode. See above for description. d147 1 a147 1 (Not yet implemented.) d149 1 a149 1 -R [user][:][group] d167 2 a168 1 -t (i mode only) List the contents of the archive to stdout; do not d171 2 a172 1 -u (i and p modes) Unconditionally overwrite existing files. Ordi- d175 6 a180 1 -v Print the name of each file to stderr as it is processed. With d186 14 a199 7 -y (o mode only) Compress the archive with bzip2-compatible compres- sion before writing to stdout. In input mode, this option is ignored; bzip2 compression is recognized automatically on input. -z (o mode only) Compress the archive with gzip-compatible compres- sion before writing it to stdout. In input mode, this option is ignored; gzip compression is recognized automatically on input. a208 3 EXIT STATUS The cpio utility exits 0 on success, and >0 if an error occurs. d210 1 a210 1 The cpio command is traditionally used to copy file heirarchies in con- d216 1 a216 1 with other standard utilities, it is possible to exercise very fine con- d218 1 a218 1 src to dest that are more than 2 days old and whose names match a partic- d223 1 a223 1 and which contain the word ``foobar'': d230 1 a230 1 The old POSIX.1 standard specified that only -i, -o, and -p were inter- d235 1 a235 1 supported by this implementation is backwards-compatible with the stan- d245 2 a246 2 ISO/IEC 9945-1:1996 (``POSIX.1'') but was dropped from IEEE Std 1003.1-2001 (``POSIX.1''). d249 1 a249 1 1003.1-2001 (``POSIX.1'') for the pax command. d253 5 a257 7 working in AT&T's Unix Support Group. They first appeared in PWB/UNIX 1.0, the ``Programmer's Work Bench'' system developed for use within AT&T and released in 1977. XXX It was first released outside of AT&T as part of System III Unix in 1981. XXX XXX Need to verify the previous state- ment. XXX As a result, cpio actually predates tar, even though it was not well-known outside of AT&T until some time later. XXX When did cpio first appear in BSD? XXX d266 3 a268 10 18 bits, which is insufficient for modern systems. The cpio archive for- mats cannot support files over 4 gigabytes, except for the ``odc'' vari- ant, which can support files up to 8 gigabytes. This is an early alpha version of cpio. The underlying libarchive library is quite mature, so the archive format support and creation of objects on disk should be robust. However, the cpio-specific options and features are still very new. Known issues that will be fixed soon: o Options documented above as ``Not yet implemented''. o Filter arguments to -i, and -it. d270 1 a270 1 FreeBSD 6.0 August 05, 2007 FreeBSD 6.0 @ 1.1.1.1 log @Import libarchive-2.4.0 @ text @@ 1.1.1.2 log @Import libarchive 2.8.0: - Infrastructure: - Allow command line tools as fallback for missing compression libraries. If compiled without gzip for example, gunzip will be used automatically. - Improved support for a number of platforms like high-resolution timestamps and Extended Attributes on various Unix systems - New convience interface for creating archives based on disk content, complement of the archive_write_disk interface. - Frontends: - bsdcpio ready for public consumption - hand-written date parser replaces the yacc code - Filter system: - Simplified read filter chains - Option support for filters - LZMA, XZ, uudecode handled - Format support: - Write support for mtree files based on file system or archive content - Basic read support for Joliet - Write support for zip files - Write support for shar archives, both text-only and binary-safe @ text @d17 3 a19 5 -i Input. Read an archive from standard input (unless overriden) and extract the contents to disk or (if the -t option is speci- fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. d21 3 a23 2 a new archive on standard output (unless overriden) containing the specified items. a30 7 -0 Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con- tain newlines. -A (o mode only) Append to the specified archive. (Not yet imple- mented.) d32 1 a35 3 -C size (o mode only) Block output to records of size bytes. a40 7 -E file (i mode only) Read list of file name patterns from file to list and extract. -F file Read archive from or write archive to file. d42 2 a43 1 (i mode only) Ignore files that match pattern. a59 9 -H format Synonym for --format. -h, --help Print usage information. -I file Read archive from file. a61 11 --insecure (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links and path names containing `..' in the name. -J (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input. -j Synonym for -y. d65 1 a65 1 instead. a69 4 -lzma (o mode only) Compress the file with lzma-compatible compression before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. a72 12 -n (i mode, only with -t) Display numeric uid and gid. By default, cpio displays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. -no-preserve-owner (i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users. -O file Write archive to file. a76 4 -preserve-owner (i mode only) Restore file ownership. This is the default when run by the root user. d78 1 a78 1 Suppress unnecessary messages. d111 2 a112 6 sion before writing it. In input mode, this option is ignored; bzip2 compression is recognized automatically on input. -Z (o mode only) Compress the archive with compress-compatible com- pression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. d115 2 a116 2 sion before writing it. In input mode, this option is ignored; gzip compression is recognized automatically on input. d173 7 a179 5 working in AT&T's Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the ``Programmer's Work Bench'' system developed for use within AT&T. They were first released outside of AT&T as part of System III Unix in 1981. As a result, cpio actually predates tar, even though it was not well-known outside of AT&T until some time later. d192 8 a199 1 FreeBSD 8.0 December 21, 2007 FreeBSD 8.0 @ 1.1.1.3 log @libarchive-2.8.2: - Fix NULL deference for short self-extracting zip archives - Don't dereference symlinks on Linux when reading ACLs - Better detection of SHA2 support for old OpenSSL versions - Fix parsing of input files for bsdtar -T - Do not leak setup_xattr into the global namespace - Fix build when an older libarchive is already installed - Use O_BINARY opening files in bsdtar - Include missing archive_crc32.h - Correctly include iconv.h required by libxml2 @ text @d1 1 a1 1 BSDCPIO(1) NetBSD General Commands Manual BSDCPIO(1) d17 1 a17 1 -i Input. Read an archive from standard input (unless overriden) d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d32 1 a32 1 -0 Read filenames separated by NUL characters instead of newlines. d36 1 a36 1 -A (o mode only) Append to the specified archive. (Not yet imple- d39 1 a39 1 -a (o and p modes) Reset access times on files after they are read. d41 1 a41 1 -B (o mode only) Block output to records of 5120 bytes. d46 1 a46 1 -c (o mode only) Use the old POSIX portable character format. d49 1 a49 1 -d (i and p modes) Create directories as necessary. d72 1 a72 1 The default format is odc. See libarchive_formats(5) for more d85 1 a85 1 -i Input mode. See above for description. d92 2 a93 2 -J (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz d96 1 a96 1 -j Synonym for -y. d98 1 a98 1 -L (o and p modes) All symbolic links will be followed. Normally, d103 1 a103 1 -l (p mode only) Create links from the target directory to the orig- d107 1 a107 1 before writing it. In input mode, this option is ignored; lzma d110 1 a110 1 -m (i and p modes) Set file modification time on created files to d113 1 a113 1 -n (i mode, only with -t) Display numeric uid and gid. By default, d125 1 a125 1 -o Output mode. See above for description. d127 1 a127 1 -p Pass-through mode. See above for description. d137 1 a137 1 Set the owner and/or group on files in the output. If group is d144 1 a144 1 by the super-user. (For compatibility, a period can be used in d147 1 a147 1 -r (All modes.) Rename files interactively. For each file, a d154 1 a154 1 -t (i mode only) List the contents of the archive to stdout; do not d157 1 a157 1 -u (i and p modes) Unconditionally overwrite existing files. Ordi- d160 1 a160 1 -v Print the name of each file to stderr as it is processed. With d166 1 a166 1 -y (o mode only) Compress the archive with bzip2-compatible compres- d170 1 a170 1 -Z (o mode only) Compress the archive with compress-compatible com- d174 1 a174 1 -z (o mode only) Compress the archive with gzip-compatible compres- d183 1 a183 1 TZ The timezone to use when displaying dates. See environ(7) for d191 1 a191 1 junction with the find(1) command. The first example here simply copies d245 2 a246 2 numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for- d250 1 a250 1 NetBSD 5.0 December 21, 2007 NetBSD 5.0 @ 1.1.1.4 log @libarchive-2.8.3: Build fix for Linux @ text @d1 1 a1 1 BSDCPIO(1) FreeBSD General Commands Manual BSDCPIO(1) d17 1 a17 1 -i Input. Read an archive from standard input (unless overriden) d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d32 1 a32 1 -0 Read filenames separated by NUL characters instead of newlines. d36 1 a36 1 -A (o mode only) Append to the specified archive. (Not yet imple- d39 1 a39 1 -a (o and p modes) Reset access times on files after they are read. d41 1 a41 1 -B (o mode only) Block output to records of 5120 bytes. d46 1 a46 1 -c (o mode only) Use the old POSIX portable character format. d49 1 a49 1 -d (i and p modes) Create directories as necessary. d72 1 a72 1 The default format is odc. See libarchive_formats(5) for more d85 1 a85 1 -i Input mode. See above for description. d92 2 a93 2 -J (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz d96 1 a96 1 -j Synonym for -y. d98 1 a98 1 -L (o and p modes) All symbolic links will be followed. Normally, d103 1 a103 1 -l (p mode only) Create links from the target directory to the orig- d107 1 a107 1 before writing it. In input mode, this option is ignored; lzma d110 1 a110 1 -m (i and p modes) Set file modification time on created files to d113 1 a113 1 -n (i mode, only with -t) Display numeric uid and gid. By default, d125 1 a125 1 -o Output mode. See above for description. d127 1 a127 1 -p Pass-through mode. See above for description. d137 1 a137 1 Set the owner and/or group on files in the output. If group is d144 1 a144 1 by the super-user. (For compatibility, a period can be used in d147 1 a147 1 -r (All modes.) Rename files interactively. For each file, a d154 1 a154 1 -t (i mode only) List the contents of the archive to stdout; do not d157 1 a157 1 -u (i and p modes) Unconditionally overwrite existing files. Ordi- d160 1 a160 1 -v Print the name of each file to stderr as it is processed. With d166 1 a166 1 -y (o mode only) Compress the archive with bzip2-compatible compres- d170 1 a170 1 -Z (o mode only) Compress the archive with compress-compatible com- d174 1 a174 1 -z (o mode only) Compress the archive with gzip-compatible compres- d183 1 a183 1 TZ The timezone to use when displaying dates. See environ(7) for d191 1 a191 1 junction with the find(1) command. The first example here simply copies d245 2 a246 2 numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for- d250 1 a250 1 FreeBSD 9.0 December 21, 2007 FreeBSD 9.0 @ 1.1.1.5 log @Import libarchive-2.8.4: - Improved reliability of hash function detection - Fix issues on ancient FreeBSD, QNX, ancient NetBSD and Minix @ text @d1 1 a1 1 BSDCPIO(1) NetBSD General Commands Manual BSDCPIO(1) d17 1 a17 1 -i Input. Read an archive from standard input (unless overriden) d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d32 1 a32 1 -0 Read filenames separated by NUL characters instead of newlines. d36 1 a36 1 -A (o mode only) Append to the specified archive. (Not yet imple- d39 1 a39 1 -a (o and p modes) Reset access times on files after they are read. d41 1 a41 1 -B (o mode only) Block output to records of 5120 bytes. d46 1 a46 1 -c (o mode only) Use the old POSIX portable character format. d49 1 a49 1 -d (i and p modes) Create directories as necessary. d72 1 a72 1 The default format is odc. See libarchive_formats(5) for more d85 1 a85 1 -i Input mode. See above for description. d92 2 a93 2 -J (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz d96 1 a96 1 -j Synonym for -y. d98 1 a98 1 -L (o and p modes) All symbolic links will be followed. Normally, d103 1 a103 1 -l (p mode only) Create links from the target directory to the orig- d107 1 a107 1 before writing it. In input mode, this option is ignored; lzma d110 1 a110 1 -m (i and p modes) Set file modification time on created files to d113 1 a113 1 -n (i mode, only with -t) Display numeric uid and gid. By default, d125 1 a125 1 -o Output mode. See above for description. d127 1 a127 1 -p Pass-through mode. See above for description. d137 1 a137 1 Set the owner and/or group on files in the output. If group is d144 1 a144 1 by the super-user. (For compatibility, a period can be used in d147 1 a147 1 -r (All modes.) Rename files interactively. For each file, a d154 1 a154 1 -t (i mode only) List the contents of the archive to stdout; do not d157 1 a157 1 -u (i and p modes) Unconditionally overwrite existing files. Ordi- d160 1 a160 1 -v Print the name of each file to stderr as it is processed. With d166 1 a166 1 -y (o mode only) Compress the archive with bzip2-compatible compres- d170 1 a170 1 -Z (o mode only) Compress the archive with compress-compatible com- d174 1 a174 1 -z (o mode only) Compress the archive with gzip-compatible compres- d183 1 a183 1 TZ The timezone to use when displaying dates. See environ(7) for d191 1 a191 1 junction with the find(1) command. The first example here simply copies d245 2 a246 2 numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for- d250 1 a250 1 NetBSD 5.0 December 21, 2007 NetBSD 5.0 @ 1.1.1.6 log @Import libarchive-3.2.1: - security fixes and other bugfixes - support for multhreading in xz 5.2+ @ text @d1 1 a1 1 CPIO(1) BSD General Commands Manual CPIO(1) d4 1 a4 1 cpio — copy files to and from archives d7 3 a9 3 cpio -i [options] [pattern ...] [< archive] cpio -o [options] < name-list [> archive] cpio -p [options] dest-dir < name-list d17 2 a18 2 -i Input. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the -t option is speci‐ d22 2 a23 2 -o Output. Read a list of filenames from standard input and produce a new archive on standard output (unless overridden) containing d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d29 1 a29 1 Unless specifically stated otherwise, options are applicable in all oper‐ d32 2 a33 3 -0, --null Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con‐ d36 1 a36 1 -A (o mode only) Append to the specified archive. (Not yet imple‐ d39 1 a39 1 -a (o and p modes) Reset access times on files after they are read. d41 1 a41 1 -B (o mode only) Block output to records of 5120 bytes. d46 1 a46 1 -c (o mode only) Use the old POSIX portable character format. d49 1 a49 2 -d, --make-directories (i and p modes) Create directories as necessary. d55 1 a55 1 -F file, --file file d61 1 a61 1 -H format, --format format d68 1 a68 1 pax The POSIX.1 pax format, an extension of the ustar for‐ d72 1 a72 1 The default format is odc. See libarchive-formats(5) for more d76 3 d85 1 a85 2 -i, --extract Input mode. See above for description. d89 2 a90 2 copying. This allows extraction via symbolic links, absolute paths, and path names containing ‘..’ in the name. d92 2 a93 3 -J, --xz (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz d96 1 a96 1 -j Synonym for -y. d98 1 a98 1 -L (o and p modes) All symbolic links will be followed. Normally, d103 1 a103 2 -l, --link (p mode only) Create links from the target directory to the orig‐ d106 2 a107 10 --lrzip (o mode only) Compress the resulting archive with lrzip(1). In input mode, this option is ignored. --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ sion before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input. --lzma (o mode only) Compress the file with lzma-compatible compression before writing it. In input mode, this option is ignored; lzma d110 1 a110 11 --lzop (o mode only) Compress the resulting archive with lzop(1). In input mode, this option is ignored. --passphrase passphrase The passphrase is used to extract or create an encrypted archive. Currently, zip is only a format that cpio can handle encrypted archives. You shouldn't use this option unless you realize how insecure use of this option is. -m, --preserve-modification-time (i and p modes) Set file modification time on created files to d113 1 a113 2 -n, --numeric-uid-gid (i mode, only with -t) Display numeric uid and gid. By default, d118 1 a118 1 --no-preserve-owner d125 1 a125 2 -o, --create Output mode. See above for description. d127 1 a127 2 -p, --pass-through Pass-through mode. See above for description. d129 1 a129 1 --preserve-owner d136 2 a137 2 -R [user][:][group], --owner [user][:][group] Set the owner and/or group on files in the output. If group is d144 1 a144 1 by the super-user. (For compatibility, a period can be used in d147 1 a147 1 -r (All modes.) Rename files interactively. For each file, a d154 1 a154 2 -t, --list (i mode only) List the contents of the archive to stdout; do not d157 1 a157 2 -u, --unconditional (i and p modes) Unconditionally overwrite existing files. Ordi‐ d160 1 a160 6 -V, --dot Print a dot to stderr for each file as it is processed. Super‐ seded by -v. -v, --verbose Print the name of each file to stderr as it is processed. With d166 1 a166 1 -y (o mode only) Compress the archive with bzip2-compatible compres‐ d170 1 a170 1 -Z (o mode only) Compress the archive with compress-compatible com‐ d174 1 a174 1 -z (o mode only) Compress the archive with gzip-compatible compres‐ a177 3 EXIT STATUS The cpio utility exits 0 on success, and >0 if an error occurs. d183 1 a183 1 TZ The timezone to use when displaying dates. See environ(7) for d186 3 d190 2 a191 2 The cpio command is traditionally used to copy file hierarchies in con‐ junction with the find(1) command. The first example here simply copies d196 1 a196 1 with other standard utilities, it is possible to exercise very fine con‐ d198 1 a198 1 src to dest that are more than 2 days old and whose names match a partic‐ d203 1 a203 1 and which contain the word “foobar”: d210 1 a210 1 The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ d215 1 a215 1 supported by this implementation is backwards-compatible with the stan‐ d225 2 a226 2 ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). d229 1 a229 1 1003.1-2001 (“POSIX.1”) for the pax command. d234 1 a234 1 PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use d245 4 a248 4 numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for‐ mats cannot support files over 4 gigabytes, except for the “odc” variant, which can support files up to 8 gigabytes. d250 1 a250 1 BSD September 16, 2014 BSD @ 1.1.1.7 log @Import libarchive-3.3.1. @ text @d3 2 a4 2 1mNAME0m 1mcpio 22m— copy files to and from archives d6 4 a9 4 1mSYNOPSIS0m 1mcpio -i 22m[4moptions24m] [4mpattern24m 4m...24m] [4m<24m 4marchive24m] 1mcpio -o 22m[4moptions24m] 4m<24m 4mname-list24m [4m>24m 4marchive24m] 1mcpio -p 22m[4moptions24m] 4mdest-dir24m 4m<24m 4mname-list0m d11 2 a12 2 1mDESCRIPTION0m 1mcpio 22mcopies files between archives and directories. This implementation d16 3 a18 3 The first option to 1mcpio 22mis a mode indicator from the following list: 1m-i 22mInput. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the 1m-t 22moption is speci‐ d22 1 a22 1 1m-o 22mOutput. Read a list of filenames from standard input and produce d25 1 a25 1 1m-p 22mPass-through. Read a list of filenames from standard input and d28 1 a28 1 1mOPTIONS0m d32 1 a32 1 1m-022m, 1m--null0m d37 1 a37 1 1m-A 22m(o mode only) Append to the specified archive. (Not yet imple‐ d40 1 a40 1 1m-a 22m(o and p modes) Reset access times on files after they are read. d42 1 a42 1 1m-B 22m(o mode only) Block output to records of 5120 bytes. d44 2 a45 2 1m-C 4m22msize0m (o mode only) Block output to records of 4msize24m bytes. d47 2 a48 2 1m-c 22m(o mode only) Use the old POSIX portable character format. Equivalent to 1m--format 4m22modc24m. d50 1 a50 1 1m-d22m, 1m--make-directories0m d53 2 a54 2 1m-E 4m22mfile0m (i mode only) Read list of file name patterns from 4mfile24m to list d57 2 a58 2 1m-F 4m22mfile24m, 1m--file 4m22mfile0m Read archive from or write archive to 4mfile24m. d60 2 a61 2 1m-f 4m22mpattern0m (i mode only) Ignore files that match 4mpattern24m. d63 1 a63 1 1m-H 4m22mformat24m, 1m--format 4m22mformat0m d67 4 a70 4 4mcpio24m Synonym for 4modc24m. 4mnewc24m The SVR4 portable cpio format. 4modc24m The old POSIX.1 portable octet-oriented cpio format. 4mpax24m The POSIX.1 pax format, an extension of the ustar for‐ d72 1 a72 1 4mustar24m The POSIX.1 tar format. d74 1 a74 1 The default format is 4modc24m. See libarchive-formats(5) for more d78 1 a78 1 1m-h22m, 1m--help0m d81 2 a82 2 1m-I 4m22mfile0m Read archive from 4mfile24m. d84 1 a84 1 1m-i22m, 1m--extract0m d87 1 a87 1 1m--insecure0m d92 1 a92 1 1m-J22m, 1m--xz0m d97 1 a97 1 1m-j 22mSynonym for 1m-y22m. d99 1 a99 1 1m-L 22m(o and p modes) All symbolic links will be followed. Normally, d104 1 a104 1 1m-l22m, 1m--link0m d108 1 a108 1 1m--lrzip0m d112 1 a112 1 1m--lz4 22m(o mode only) Compress the archive with lz4-compatible compres‐ d116 1 a116 1 1m--lzma 22m(o mode only) Compress the file with lzma-compatible compression d120 1 a120 1 1m--lzop 22m(o mode only) Compress the resulting archive with lzop(1). In d123 3 a125 3 1m--passphrase 4m22mpassphrase0m The 4mpassphrase24m is used to extract or create an encrypted archive. Currently, zip is only a format that 1mcpio 22mcan handle encrypted d129 1 a129 1 1m-m22m, 1m--preserve-modification-time0m d133 3 a135 3 1m-n22m, 1m--numeric-uid-gid0m (i mode, only with 1m-t22m) Display numeric uid and gid. By default, 1mcpio 22mdisplays the user and group names when they are provided in d139 1 a139 1 1m--no-preserve-owner0m d143 2 a144 2 1m-O 4m22mfile0m Write archive to 4mfile24m. d146 1 a146 1 1m-o22m, 1m--create0m d149 1 a149 1 1m-p22m, 1m--pass-through0m d152 1 a152 1 1m--preserve-owner0m d156 1 a156 1 1m--quiet0m d159 1 a159 1 1m-R 22m[user][:][group], 1m--owner 22m[user][:][group] d161 1 a161 1 specified with no user (for example, 1m-R 4m22m:wheel24m) then the group d163 1 a163 1 trailing colon and no group (for example, 1m-R 4m22mroot:24m) then the d166 1 a166 1 not the group. In 1m-i 22mand 1m-p 22mmodes, this option can only be used d170 3 a172 3 1m-r 22m(All modes.) Rename files interactively. For each file, a prompt is written to 4m/dev/tty24m containing the name of the file and a line is read from 4m/dev/tty24m. If the line read is blank, the d177 1 a177 1 1m-t22m, 1m--list0m d181 1 a181 1 1m-u22m, 1m--unconditional0m d185 1 a185 1 1m-V22m, 1m--dot0m d187 1 a187 1 seded by 1m-v22m. d189 1 a189 1 1m-v22m, 1m--verbose0m d191 1 a191 1 1m-t22m, provide a detailed listing of each file. d193 1 a193 1 1m--version0m d196 1 a196 1 1m-y 22m(o mode only) Compress the archive with bzip2-compatible compres‐ d200 1 a200 1 1m-Z 22m(o mode only) Compress the archive with compress-compatible com‐ d204 1 a204 1 1m-z 22m(o mode only) Compress the archive with gzip-compatible compres‐ d208 2 a209 2 1mEXIT STATUS0m The 1mcpio 22mutility exits 0 on success, and >0 if an error occurs. d211 2 a212 2 1mENVIRONMENT0m The following environment variables affect the execution of 1mcpio22m: d219 2 a220 2 1mEXAMPLES0m The 1mcpio 22mcommand is traditionally used to copy file hierarchies in con‐ d222 2 a223 2 all files from 4msrc24m to 4mdest24m: 1mfind 4m22msrc24m | 1mcpio -pmud 4m22mdest0m d228 1 a228 1 4msrc24m to 4mdest24m that are more than 2 days old and whose names match a partic‐ d230 1 a230 1 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mgrep foo[bar] 22m| 1mcpio -pdmu 4m22mdest0m d232 1 a232 1 This example copies files from 4msrc24m to 4mdest24m that are more than 2 days old d234 1 a234 1 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mxargs grep -l foobar 22m| 1mcpio -pdmu 4m22mdest0m d236 1 a236 1 1mCOMPATIBILITY0m d240 1 a240 1 The old POSIX.1 standard specified that only 1m-i22m, 1m-o22m, and 1m-p 22mwere inter‐ d242 3 a244 3 modifier characters. For example, the standard syntax allows 1m-imu 22mbut does not support 1m-miu 22mor 1m-i -m -u22m, since 4mm24m and 4mu24m are only modifiers to 1m-i22m, they are not command-line options in their own right. The syntax d249 1 a249 1 1mSEE ALSO0m d253 1 a253 1 1mSTANDARDS0m d261 2 a262 2 1mHISTORY0m The original 1mcpio 22mand 1mfind 22mutilities were written by Dick Haight while d266 1 a266 1 III Unix in 1981. As a result, 1mcpio 22mactually predates 1mtar22m, even though d271 1 a271 1 1mBUGS0m @ 1.1.1.8 log @Import libarchive-3.3.2 + 9de5f3 + f9dacbf: - Support NFS4 ACLs on Linux - Bugfixes @ text @d3 2 a4 2 NAME cpio — copy files to and from archives d6 4 a9 4 SYNOPSIS cpio -i [options] [pattern ...] [< archive] cpio -o [options] < name-list [> archive] cpio -p [options] dest-dir < name-list d11 2 a12 2 DESCRIPTION cpio copies files between archives and directories. This implementation d16 3 a18 3 The first option to cpio is a mode indicator from the following list: -i Input. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the -t option is speci‐ d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d28 1 a28 1 OPTIONS d32 1 a32 1 -0, --null d37 1 a37 1 -A (o mode only) Append to the specified archive. (Not yet imple‐ d40 1 a40 1 -a (o and p modes) Reset access times on files after they are read. d42 1 a42 1 -B (o mode only) Block output to records of 5120 bytes. d44 2 a45 2 -C size (o mode only) Block output to records of size bytes. d47 2 a48 2 -c (o mode only) Use the old POSIX portable character format. Equivalent to --format odc. d50 1 a50 1 -d, --make-directories d53 2 a54 2 -E file (i mode only) Read list of file name patterns from file to list d57 2 a58 2 -F file, --file file Read archive from or write archive to file. d60 2 a61 2 -f pattern (i mode only) Ignore files that match pattern. d63 1 a63 1 -H format, --format format d67 4 a70 4 cpio Synonym for odc. newc The SVR4 portable cpio format. odc The old POSIX.1 portable octet-oriented cpio format. pax The POSIX.1 pax format, an extension of the ustar for‐ d72 1 a72 1 ustar The POSIX.1 tar format. d74 1 a74 1 The default format is odc. See libarchive-formats(5) for more d78 1 a78 1 -h, --help d81 2 a82 2 -I file Read archive from file. d84 1 a84 1 -i, --extract d87 1 a87 1 --insecure d92 1 a92 1 -J, --xz d97 1 a97 1 -j Synonym for -y. d99 1 a99 1 -L (o and p modes) All symbolic links will be followed. Normally, d104 1 a104 1 -l, --link d108 1 a108 1 --lrzip d112 1 a112 1 --lz4 (o mode only) Compress the archive with lz4-compatible compres‐ d116 1 a116 1 --lzma (o mode only) Compress the file with lzma-compatible compression d120 1 a120 1 --lzop (o mode only) Compress the resulting archive with lzop(1). In d123 3 a125 3 --passphrase passphrase The passphrase is used to extract or create an encrypted archive. Currently, zip is only a format that cpio can handle encrypted d129 1 a129 1 -m, --preserve-modification-time d133 3 a135 3 -n, --numeric-uid-gid (i mode, only with -t) Display numeric uid and gid. By default, cpio displays the user and group names when they are provided in d139 1 a139 1 --no-preserve-owner d143 2 a144 2 -O file Write archive to file. d146 1 a146 1 -o, --create d149 1 a149 1 -p, --pass-through d152 1 a152 1 --preserve-owner d156 1 a156 1 --quiet d159 1 a159 1 -R [user][:][group], --owner [user][:][group] d161 1 a161 1 specified with no user (for example, -R :wheel) then the group d163 1 a163 1 trailing colon and no group (for example, -R root:) then the d166 1 a166 1 not the group. In -i and -p modes, this option can only be used d170 3 a172 3 -r (All modes.) Rename files interactively. For each file, a prompt is written to /dev/tty containing the name of the file and a line is read from /dev/tty. If the line read is blank, the d177 1 a177 1 -t, --list d181 1 a181 1 -u, --unconditional d185 1 a185 1 -V, --dot d187 1 a187 1 seded by -v. d189 1 a189 1 -v, --verbose d191 1 a191 1 -t, provide a detailed listing of each file. d193 1 a193 1 --version d196 1 a196 1 -y (o mode only) Compress the archive with bzip2-compatible compres‐ d200 1 a200 1 -Z (o mode only) Compress the archive with compress-compatible com‐ d204 1 a204 1 -z (o mode only) Compress the archive with gzip-compatible compres‐ d208 2 a209 2 EXIT STATUS The cpio utility exits 0 on success, and >0 if an error occurs. d211 2 a212 2 ENVIRONMENT The following environment variables affect the execution of cpio: d219 2 a220 2 EXAMPLES The cpio command is traditionally used to copy file hierarchies in con‐ d222 2 a223 2 all files from src to dest: find src | cpio -pmud dest d228 1 a228 1 src to dest that are more than 2 days old and whose names match a partic‐ d230 1 a230 1 find src -mtime +2 | grep foo[bar] | cpio -pdmu dest d232 1 a232 1 This example copies files from src to dest that are more than 2 days old d234 1 a234 1 find src -mtime +2 | xargs grep -l foobar | cpio -pdmu dest d236 1 a236 1 COMPATIBILITY d240 1 a240 1 The old POSIX.1 standard specified that only -i, -o, and -p were inter‐ d242 3 a244 3 modifier characters. For example, the standard syntax allows -imu but does not support -miu or -i -m -u, since m and u are only modifiers to -i, they are not command-line options in their own right. The syntax d249 1 a249 1 SEE ALSO d253 1 a253 1 STANDARDS d261 2 a262 2 HISTORY The original cpio and find utilities were written by Dick Haight while d266 1 a266 1 III Unix in 1981. As a result, cpio actually predates tar, even though d271 1 a271 1 BUGS @ 1.1.1.9 log @Import libarchive-3.3.3 as should have done originally. @ text @a115 4 --zstd (o mode only) Compress the archive with zstd-compatible compres‐ sion before writing it. In input mode, this option is ignored; zstd compression is recognized automatically on input. @ 1.1.1.10 log @Import libarchive 3.4.0 @ text @d205 2 a206 2 pression before writing it. In input mode, this option is ig‐ nored; compression is recognized automatically on input. @ 1.1.1.11 log @Import libarchive 3.7.2 @ text @d1 1 a1 1 CPIO(1) BSD General Commands Manual CPIO(1) d17 1 a17 1 -i Input. Read an archive from standard input (unless overridden) d22 1 a22 1 -o Output. Read a list of filenames from standard input and produce d25 1 a25 1 -p Pass-through. Read a list of filenames from standard input and d37 1 a37 10 -6, --pwb When reading a binary format archive, assume it's the earlier one, from the PWB variant of 6th Edition UNIX. When writing a cpio archive, use the PWB format. -7, --binary (o mode only) When writing a cpio archive, use the (newer, non- PWB) binary format. -A (o mode only) Append to the specified archive. (Not yet imple‐ d40 1 a40 1 -a (o and p modes) Reset access times on files after they are read. d42 1 a42 1 -B (o mode only) Block output to records of 5120 bytes. d47 1 a47 1 -c (o mode only) Use the old POSIX portable character format. d74 1 a74 1 The default format is odc. See libarchive-formats(5) for more d94 1 a94 1 before writing it. In input mode, this option is ignored; xz d97 1 a97 1 -j Synonym for -y. d99 1 a99 1 -L (o and p modes) All symbolic links will be followed. Normally, d121 1 a121 1 before writing it. In input mode, this option is ignored; lzma d124 1 a124 1 --lzop (o mode only) Compress the resulting archive with lzop(1). In d154 1 a154 1 Pass-through mode. See above for description. d164 1 a164 1 Set the owner and/or group on files in the output. If group is d171 1 a171 1 by the super-user. (For compatibility, a period can be used in d174 1 a174 1 -r (All modes.) Rename files interactively. For each file, a d200 1 a200 1 -y (o mode only) Compress the archive with bzip2-compatible compres‐ d204 1 a204 1 -Z (o mode only) Compress the archive with compress-compatible com‐ d208 1 a208 1 -z (o mode only) Compress the archive with gzip-compatible compres‐ d220 1 a220 1 TZ The timezone to use when displaying dates. See environ(7) for d225 1 a225 1 junction with the find(1) command. The first example here simply copies d254 1 a254 1 bzip2(1), gzip(1), mt(1), pax(1), tar(1), libarchive(3), cpio(5), d279 2 a280 2 numbering. Older cpio formats limit the user and group numbers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive for‐ @ 1.1.1.12 log @libarchove: import version 3.7.7 @ text @d1 1 a1 1 4mCPIO24m(1) General Commands Manual 4mCPIO24m(1) d3 2 a4 2 1mNAME0m cpio — copy files to and from archives d6 286 a291 289 1mSYNOPSIS0m 1mcpio -i 22m[4moptions24m] [4mpattern24m 4m...24m] [4m<24m 4marchive24m] 1mcpio -o 22m[4moptions24m] 4m<24m 4mname-list24m [4m>24m 4marchive24m] 1mcpio -p 22m[4moptions24m] 4mdest-dir24m 4m<24m 4mname-list0m 1mDESCRIPTION0m 1mcpio 22mcopies files between archives and directories. This implementa‐ tion can extract from tar, pax, cpio, zip, jar, ar, and ISO 9660 cdrom images and can create tar, pax, cpio, ar, and shar archives. The first option to 1mcpio 22mis a mode indicator from the following list: 1m-i 22mInput. Read an archive from standard input (unless overridden) and extract the contents to disk or (if the 1m-t 22moption is speci‐ fied) list the contents to standard output. If one or more file patterns are specified, only files matching one of the patterns will be extracted. 1m-o 22mOutput. Read a list of filenames from standard input and pro‐ duce a new archive on standard output (unless overridden) con‐ taining the specified items. 1m-p 22mPass-through. Read a list of filenames from standard input and copy the files to the specified directory. 1mOPTIONS0m Unless specifically stated otherwise, options are applicable in all op‐ erating modes. 1m-022m, 1m--null0m Read filenames separated by NUL characters instead of newlines. This is necessary if any of the filenames being read might con‐ tain newlines. 1m-622m, 1m--pwb0m When reading a binary format archive, assume it's the earlier one, from the PWB variant of 6th Edition UNIX. When writing a cpio archive, use the PWB format. 1m-722m, 1m--binary0m (o mode only) When writing a cpio archive, use the (newer, non- PWB) binary format. 1m-A 22m(o mode only) Append to the specified archive. (Not yet imple‐ mented.) 1m-a 22m(o and p modes) Reset access times on files after they are read. 1m-B 22m(o mode only) Block output to records of 5120 bytes. 1m-C 4m22msize0m (o mode only) Block output to records of 4msize24m bytes. 1m-c 22m(o mode only) Use the old POSIX portable character format. Equivalent to 1m--format 4m22modc24m. 1m-d22m, 1m--make-directories0m (i and p modes) Create directories as necessary. 1m-E 4m22mfile0m (i mode only) Read list of file name patterns from 4mfile24m to list and extract. 1m-F 4m22mfile24m, 1m--file 4m22mfile0m Read archive from or write archive to 4mfile24m. 1m-f 4m22mpattern0m (i mode only) Ignore files that match 4mpattern24m. 1m-H 4m22mformat24m, 1m--format 4m22mformat0m (o mode only) Produce the output archive in the specified for‐ mat. Supported formats include: 4mcpio24m Synonym for 4modc24m. 4mnewc24m The SVR4 portable cpio format. 4modc24m The old POSIX.1 portable octet-oriented cpio format. 4mpax24m The POSIX.1 pax format, an extension of the ustar for‐ mat. 4mustar24m The POSIX.1 tar format. The default format is 4modc24m. See 4mlibarchive-formats24m(5) for more complete information about the formats currently supported by the underlying 4mlibarchive24m(3) library. 1m-h22m, 1m--help0m Print usage information. 1m-I 4m22mfile0m Read archive from 4mfile24m. 1m-i22m, 1m--extract0m Input mode. See above for description. 1m--insecure0m (i and p mode only) Disable security checks during extraction or copying. This allows extraction via symbolic links, ab‐ solute paths, and path names containing ‘..’ in the name. 1m-J22m, 1m--xz0m (o mode only) Compress the file with xz-compatible compression before writing it. In input mode, this option is ignored; xz compression is recognized automatically on input. 1m-j 22mSynonym for 1m-y22m. 1m-L 22m(o and p modes) All symbolic links will be followed. Normally, symbolic links are archived and copied as symbolic links. With this option, the target of the link will be archived or copied instead. 1m-l22m, 1m--link0m (p mode only) Create links from the target directory to the original files, instead of copying. 1m--lrzip0m (o mode only) Compress the resulting archive with 4mlrzip24m(1). In input mode, this option is ignored. 1m--lz4 22m(o mode only) Compress the archive with lz4-compatible compres‐ sion before writing it. In input mode, this option is ignored; lz4 compression is recognized automatically on input. 1m--zstd 22m(o mode only) Compress the archive with zstd-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; zstd compression is recognized automatically on input. 1m--lzma 22m(o mode only) Compress the file with lzma-compatible compres‐ sion before writing it. In input mode, this option is ignored; lzma compression is recognized automatically on input. 1m--lzop 22m(o mode only) Compress the resulting archive with 4mlzop24m(1). In input mode, this option is ignored. 1m--passphrase 4m22mpassphrase0m The 4mpassphrase24m is used to extract or create an encrypted archive. Currently, zip is only a format that 1mcpio 22mcan handle encrypted archives. You shouldn't use this option unless you realize how insecure use of this option is. 1m-m22m, 1m--preserve-modification-time0m (i and p modes) Set file modification time on created files to match those in the source. 1m-n22m, 1m--numeric-uid-gid0m (i mode, only with 1m-t22m) Display numeric uid and gid. By de‐ fault, 1mcpio 22mdisplays the user and group names when they are provided in the archive, or looks up the user and group names in the system password database. 1m--no-preserve-owner0m (i mode only) Do not attempt to restore file ownership. This is the default when run by non-root users. 1m-O 4m22mfile0m Write archive to 4mfile24m. 1m-o22m, 1m--create0m Output mode. See above for description. 1m-p22m, 1m--pass-through0m Pass-through mode. See above for description. 1m--preserve-owner0m (i mode only) Restore file ownership. This is the default when run by the root user. 1m--quiet0m Suppress unnecessary messages. 1m-R 22m[user][:][group], 1m--owner 22m[user][:][group] Set the owner and/or group on files in the output. If group is specified with no user (for example, 1m-R 4m22m:wheel24m) then the group will be set but not the user. If the user is specified with a trailing colon and no group (for example, 1m-R 4m22mroot:24m) then the group will be set to the user's default group. If the user is specified with no trailing colon, then the user will be set but not the group. In 1m-i 22mand 1m-p 22mmodes, this option can only be used by the super-user. (For compatibility, a period can be used in place of the colon.) 1m-r 22m(All modes.) Rename files interactively. For each file, a prompt is written to 4m/dev/tty24m containing the name of the file and a line is read from 4m/dev/tty24m. If the line read is blank, the file is skipped. If the line contains a single period, the file is processed normally. Otherwise, the line is taken to be the new name of the file. 1m-t22m, 1m--list0m (i mode only) List the contents of the archive to stdout; do not restore the contents to disk. 1m-u22m, 1m--unconditional0m (i and p modes) Unconditionally overwrite existing files. Or‐ dinarily, an older file will not overwrite a newer file on disk. 1m-V22m, 1m--dot0m Print a dot to stderr for each file as it is processed. Super‐ seded by 1m-v22m. 1m-v22m, 1m--verbose0m Print the name of each file to stderr as it is processed. With 1m-t22m, provide a detailed listing of each file. 1m--version0m Print the program version information and exit. 1m-y 22m(o mode only) Compress the archive with bzip2-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; bzip2 compression is recognized automatically on input. 1m-Z 22m(o mode only) Compress the archive with compress-compatible compression before writing it. In input mode, this option is ignored; compression is recognized automatically on input. 1m-z 22m(o mode only) Compress the archive with gzip-compatible com‐ pression before writing it. In input mode, this option is ig‐ nored; gzip compression is recognized automatically on input. 1mEXIT STATUS0m The 1mcpio 22mutility exits 0 on success, and >0 if an error occurs. 1mENVIRONMENT0m The following environment variables affect the execution of 1mcpio22m: LANG The locale to use. See 4menviron24m(7) for more information. TZ The timezone to use when displaying dates. See 4menviron24m(7) for more information. 1mEXAMPLES0m The 1mcpio 22mcommand is traditionally used to copy file hierarchies in con‐ junction with the 4mfind24m(1) command. The first example here simply copies all files from 4msrc24m to 4mdest24m: 1mfind 4m22msrc24m | 1mcpio -pmud 4m22mdest0m By carefully selecting options to the 4mfind24m(1) command and combining it with other standard utilities, it is possible to exercise very fine control over which files are copied. This next example copies files from 4msrc24m to 4mdest24m that are more than 2 days old and whose names match a particular pattern: 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mgrep foo[bar] 22m| 1mcpio -pdmu 4m22mdest0m This example copies files from 4msrc24m to 4mdest24m that are more than 2 days old and which contain the word “foobar”: 1mfind 4m22msrc24m 1m-mtime 4m22m+224m | 1mxargs grep -l foobar 22m| 1mcpio -pdmu 4m22mdest0m 1mCOMPATIBILITY0m The mode options i, o, and p and the options a, B, c, d, f, l, m, r, t, u, and v comply with SUSv2. The old POSIX.1 standard specified that only 1m-i22m, 1m-o22m, and 1m-p 22mwere inter‐ preted as command-line options. Each took a single argument of a list of modifier characters. For example, the standard syntax allows 1m-imu0m but does not support 1m-miu 22mor 1m-i -m -u22m, since 4mm24m and 4mu24m are only modifiers to 1m-i22m, they are not command-line options in their own right. The syn‐ tax supported by this implementation is backwards-compatible with the standard. For best compatibility, scripts should limit themselves to the standard syntax. 1mSEE ALSO0m 4mbzip224m(1), 4mgzip24m(1), 4mmt24m(1), 4mpax24m(1), 4mtar24m(1), 4mlibarchive24m(3), 4mcpio24m(5), 4mlibarchive-formats24m(5), 4mtar24m(5) 1mSTANDARDS0m There is no current POSIX standard for the cpio command; it appeared in ISO/IEC 9945-1:1996 (“POSIX.1”) but was dropped from IEEE Std 1003.1-2001 (“POSIX.1”). The cpio, ustar, and pax interchange file formats are defined by IEEE Std 1003.1-2001 (“POSIX.1”) for the pax command. 1mHISTORY0m The original 1mcpio 22mand 1mfind 22mutilities were written by Dick Haight while working in AT&T's Unix Support Group. They first appeared in 1977 in PWB/UNIX 1.0, the “Programmer's Work Bench” system developed for use within AT&T. They were first released outside of AT&T as part of Sys‐ tem III Unix in 1981. As a result, 1mcpio 22mactually predates 1mtar22m, even though it was not well-known outside of AT&T until some time later. This is a complete re-implementation based on the 4mlibarchive24m(3) li‐ brary. 1mBUGS0m The cpio archive format has several basic limitations: It does not store user and group names, only numbers. As a result, it cannot be reliably used to transfer files between systems with dissimilar user and group numbering. Older cpio formats limit the user and group num‐ bers to 16 or 18 bits, which is insufficient for modern systems. The cpio archive formats cannot support files over 4 gigabytes, except for the “odc” variant, which can support files up to 8 gigabytes. d293 1 a293 1 Debian September 16, 2014 4mCPIO24m(1) @