160b4ad09SPeter Avalos.\" Copyright (c) 2003-2007 Tim Kientzle 260b4ad09SPeter Avalos.\" All rights reserved. 360b4ad09SPeter Avalos.\" 460b4ad09SPeter Avalos.\" Redistribution and use in source and binary forms, with or without 560b4ad09SPeter Avalos.\" modification, are permitted provided that the following conditions 660b4ad09SPeter Avalos.\" are met: 760b4ad09SPeter Avalos.\" 1. Redistributions of source code must retain the above copyright 860b4ad09SPeter Avalos.\" notice, this list of conditions and the following disclaimer. 960b4ad09SPeter Avalos.\" 2. Redistributions in binary form must reproduce the above copyright 1060b4ad09SPeter Avalos.\" notice, this list of conditions and the following disclaimer in the 1160b4ad09SPeter Avalos.\" documentation and/or other materials provided with the distribution. 1260b4ad09SPeter Avalos.\" 1360b4ad09SPeter Avalos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1460b4ad09SPeter Avalos.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1560b4ad09SPeter Avalos.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1660b4ad09SPeter Avalos.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1760b4ad09SPeter Avalos.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1860b4ad09SPeter Avalos.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1960b4ad09SPeter Avalos.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2060b4ad09SPeter Avalos.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2160b4ad09SPeter Avalos.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2260b4ad09SPeter Avalos.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2360b4ad09SPeter Avalos.\" SUCH DAMAGE. 2460b4ad09SPeter Avalos.\" 2560b4ad09SPeter Avalos.\" $FreeBSD$ 2660b4ad09SPeter Avalos.\" 276b384f39SPeter Avalos.Dd September 16, 2014 28c09f92d2SPeter Avalos.Dt CPIO 1 2960b4ad09SPeter Avalos.Os 3060b4ad09SPeter Avalos.Sh NAME 3160b4ad09SPeter Avalos.Nm cpio 3260b4ad09SPeter Avalos.Nd copy files to and from archives 3360b4ad09SPeter Avalos.Sh SYNOPSIS 3460b4ad09SPeter Avalos.Nm 356b384f39SPeter Avalos.Fl i 3660b4ad09SPeter Avalos.Op Ar options 3760b4ad09SPeter Avalos.Op Ar pattern ... 3860b4ad09SPeter Avalos.Op Ar < archive 3960b4ad09SPeter Avalos.Nm 406b384f39SPeter Avalos.Fl o 4160b4ad09SPeter Avalos.Op Ar options 4260b4ad09SPeter Avalos.Ar < name-list 4360b4ad09SPeter Avalos.Op Ar > archive 4460b4ad09SPeter Avalos.Nm 456b384f39SPeter Avalos.Fl p 4660b4ad09SPeter Avalos.Op Ar options 4760b4ad09SPeter Avalos.Ar dest-dir 4860b4ad09SPeter Avalos.Ar < name-list 4960b4ad09SPeter Avalos.Sh DESCRIPTION 5060b4ad09SPeter Avalos.Nm 5160b4ad09SPeter Avaloscopies files between archives and directories. 5260b4ad09SPeter AvalosThis implementation can extract from tar, pax, cpio, zip, jar, ar, 5360b4ad09SPeter Avalosand ISO 9660 cdrom images and can create tar, pax, cpio, ar, 5460b4ad09SPeter Avalosand shar archives. 5560b4ad09SPeter Avalos.Pp 5660b4ad09SPeter AvalosThe first option to 5760b4ad09SPeter Avalos.Nm 5860b4ad09SPeter Avalosis a mode indicator from the following list: 5960b4ad09SPeter Avalos.Bl -tag -compact -width indent 6060b4ad09SPeter Avalos.It Fl i 6160b4ad09SPeter AvalosInput. 6255c601bbSPeter AvalosRead an archive from standard input (unless overridden) and extract the 6360b4ad09SPeter Avaloscontents to disk or (if the 6460b4ad09SPeter Avalos.Fl t 6560b4ad09SPeter Avalosoption is specified) 6660b4ad09SPeter Avaloslist the contents to standard output. 6760b4ad09SPeter AvalosIf one or more file patterns are specified, only files matching 6860b4ad09SPeter Avalosone of the patterns will be extracted. 6960b4ad09SPeter Avalos.It Fl o 7060b4ad09SPeter AvalosOutput. 7160b4ad09SPeter AvalosRead a list of filenames from standard input and produce a new archive 7255c601bbSPeter Avaloson standard output (unless overridden) containing the specified items. 7360b4ad09SPeter Avalos.It Fl p 7460b4ad09SPeter AvalosPass-through. 7560b4ad09SPeter AvalosRead a list of filenames from standard input and copy the files to the 7660b4ad09SPeter Avalosspecified directory. 7760b4ad09SPeter Avalos.El 7860b4ad09SPeter Avalos.Sh OPTIONS 7960b4ad09SPeter AvalosUnless specifically stated otherwise, options are applicable in 8060b4ad09SPeter Avalosall operating modes. 8160b4ad09SPeter Avalos.Bl -tag -width indent 82c09f92d2SPeter Avalos.It Fl 0 , Fl Fl null 839c82a63eSPeter AvalosRead filenames separated by NUL characters instead of newlines. 849c82a63eSPeter AvalosThis is necessary if any of the filenames being read might contain newlines. 85*50f8aa9cSAntonio Huete Jimenez.It Fl 6 , Fl Fl pwb 86*50f8aa9cSAntonio Huete JimenezWhen reading a binary format archive, assume it's the earlier one, 87*50f8aa9cSAntonio Huete Jimenezfrom the PWB variant of 6th Edition UNIX. 88*50f8aa9cSAntonio Huete JimenezWhen writing a cpio archive, use the PWB format. 89*50f8aa9cSAntonio Huete Jimenez.It Fl 7 , Fl Fl binary 90*50f8aa9cSAntonio Huete Jimenez(o mode only) 91*50f8aa9cSAntonio Huete JimenezWhen writing a cpio archive, use the (newer, non-PWB) binary format. 9260b4ad09SPeter Avalos.It Fl A 9360b4ad09SPeter Avalos(o mode only) 9460b4ad09SPeter AvalosAppend to the specified archive. 9560b4ad09SPeter Avalos(Not yet implemented.) 9660b4ad09SPeter Avalos.It Fl a 9760b4ad09SPeter Avalos(o and p modes) 9860b4ad09SPeter AvalosReset access times on files after they are read. 9960b4ad09SPeter Avalos.It Fl B 10060b4ad09SPeter Avalos(o mode only) 10160b4ad09SPeter AvalosBlock output to records of 5120 bytes. 10260b4ad09SPeter Avalos.It Fl C Ar size 10360b4ad09SPeter Avalos(o mode only) 10460b4ad09SPeter AvalosBlock output to records of 10560b4ad09SPeter Avalos.Ar size 10660b4ad09SPeter Avalosbytes. 10760b4ad09SPeter Avalos.It Fl c 10860b4ad09SPeter Avalos(o mode only) 10960b4ad09SPeter AvalosUse the old POSIX portable character format. 11060b4ad09SPeter AvalosEquivalent to 111c09f92d2SPeter Avalos.Fl Fl format Ar odc . 112c09f92d2SPeter Avalos.It Fl d , Fl Fl make-directories 11360b4ad09SPeter Avalos(i and p modes) 11460b4ad09SPeter AvalosCreate directories as necessary. 11560b4ad09SPeter Avalos.It Fl E Ar file 11660b4ad09SPeter Avalos(i mode only) 11760b4ad09SPeter AvalosRead list of file name patterns from 11860b4ad09SPeter Avalos.Ar file 11960b4ad09SPeter Avalosto list and extract. 120c09f92d2SPeter Avalos.It Fl F Ar file , Fl Fl file Ar file 12160b4ad09SPeter AvalosRead archive from or write archive to 12260b4ad09SPeter Avalos.Ar file . 12360b4ad09SPeter Avalos.It Fl f Ar pattern 12460b4ad09SPeter Avalos(i mode only) 12560b4ad09SPeter AvalosIgnore files that match 12660b4ad09SPeter Avalos.Ar pattern . 127c09f92d2SPeter Avalos.It Fl H Ar format , Fl Fl format Ar format 12860b4ad09SPeter Avalos(o mode only) 12960b4ad09SPeter AvalosProduce the output archive in the specified format. 13060b4ad09SPeter AvalosSupported formats include: 13160b4ad09SPeter Avalos.Pp 13260b4ad09SPeter Avalos.Bl -tag -width "iso9660" -compact 13360b4ad09SPeter Avalos.It Ar cpio 13460b4ad09SPeter AvalosSynonym for 13560b4ad09SPeter Avalos.Ar odc . 13660b4ad09SPeter Avalos.It Ar newc 13760b4ad09SPeter AvalosThe SVR4 portable cpio format. 13860b4ad09SPeter Avalos.It Ar odc 13960b4ad09SPeter AvalosThe old POSIX.1 portable octet-oriented cpio format. 14060b4ad09SPeter Avalos.It Ar pax 14160b4ad09SPeter AvalosThe POSIX.1 pax format, an extension of the ustar format. 14260b4ad09SPeter Avalos.It Ar ustar 14360b4ad09SPeter AvalosThe POSIX.1 tar format. 14460b4ad09SPeter Avalos.El 14560b4ad09SPeter Avalos.Pp 14660b4ad09SPeter AvalosThe default format is 14760b4ad09SPeter Avalos.Ar odc . 14860b4ad09SPeter AvalosSee 149c09f92d2SPeter Avalos.Xr libarchive-formats 5 15060b4ad09SPeter Avalosfor more complete information about the 15160b4ad09SPeter Avalosformats currently supported by the underlying 15260b4ad09SPeter Avalos.Xr libarchive 3 15360b4ad09SPeter Avaloslibrary. 154c09f92d2SPeter Avalos.It Fl h , Fl Fl help 1559c82a63eSPeter AvalosPrint usage information. 15660b4ad09SPeter Avalos.It Fl I Ar file 15760b4ad09SPeter AvalosRead archive from 15860b4ad09SPeter Avalos.Ar file . 159c09f92d2SPeter Avalos.It Fl i , Fl Fl extract 16060b4ad09SPeter AvalosInput mode. 16160b4ad09SPeter AvalosSee above for description. 162c09f92d2SPeter Avalos.It Fl Fl insecure 16360b4ad09SPeter Avalos(i and p mode only) 16460b4ad09SPeter AvalosDisable security checks during extraction or copying. 1656b384f39SPeter AvalosThis allows extraction via symbolic links, absolute paths, 1666b384f39SPeter Avalosand path names containing 16760b4ad09SPeter Avalos.Sq .. 16860b4ad09SPeter Avalosin the name. 169c09f92d2SPeter Avalos.It Fl J , Fl Fl xz 1709c82a63eSPeter Avalos(o mode only) 1719c82a63eSPeter AvalosCompress the file with xz-compatible compression before writing it. 1729c82a63eSPeter AvalosIn input mode, this option is ignored; xz compression is recognized 1739c82a63eSPeter Avalosautomatically on input. 1749c82a63eSPeter Avalos.It Fl j 1759c82a63eSPeter AvalosSynonym for 1769c82a63eSPeter Avalos.Fl y . 17760b4ad09SPeter Avalos.It Fl L 17860b4ad09SPeter Avalos(o and p modes) 17960b4ad09SPeter AvalosAll symbolic links will be followed. 18060b4ad09SPeter AvalosNormally, symbolic links are archived and copied as symbolic links. 18160b4ad09SPeter AvalosWith this option, the target of the link will be archived or copied instead. 182c09f92d2SPeter Avalos.It Fl l , Fl Fl link 18360b4ad09SPeter Avalos(p mode only) 18460b4ad09SPeter AvalosCreate links from the target directory to the original files, 18560b4ad09SPeter Avalosinstead of copying. 186d4d8193eSPeter Avalos.It Fl Fl lrzip 187d4d8193eSPeter Avalos(o mode only) 188d4d8193eSPeter AvalosCompress the resulting archive with 189d4d8193eSPeter Avalos.Xr lrzip 1 . 190d4d8193eSPeter AvalosIn input mode, this option is ignored. 1916b384f39SPeter Avalos.It Fl Fl lz4 1926b384f39SPeter Avalos(o mode only) 1936b384f39SPeter AvalosCompress the archive with lz4-compatible compression before writing it. 1946b384f39SPeter AvalosIn input mode, this option is ignored; lz4 compression is recognized 1956b384f39SPeter Avalosautomatically on input. 196e95abc47Szrj.It Fl Fl zstd 197e95abc47Szrj(o mode only) 198e95abc47SzrjCompress the archive with zstd-compatible compression before writing it. 199e95abc47SzrjIn input mode, this option is ignored; zstd compression is recognized 200e95abc47Szrjautomatically on input. 201c09f92d2SPeter Avalos.It Fl Fl lzma 2029c82a63eSPeter Avalos(o mode only) 2039c82a63eSPeter AvalosCompress the file with lzma-compatible compression before writing it. 2049c82a63eSPeter AvalosIn input mode, this option is ignored; lzma compression is recognized 2059c82a63eSPeter Avalosautomatically on input. 206d4d8193eSPeter Avalos.It Fl Fl lzop 207d4d8193eSPeter Avalos(o mode only) 208d4d8193eSPeter AvalosCompress the resulting archive with 209d4d8193eSPeter Avalos.Xr lzop 1 . 210d4d8193eSPeter AvalosIn input mode, this option is ignored. 2116b384f39SPeter Avalos.It Fl Fl passphrase Ar passphrase 2126b384f39SPeter AvalosThe 2136b384f39SPeter Avalos.Pa passphrase 2146b384f39SPeter Avalosis used to extract or create an encrypted archive. 2156b384f39SPeter AvalosCurrently, zip is only a format that 2166b384f39SPeter Avalos.Nm 2176b384f39SPeter Avaloscan handle encrypted archives. 2186b384f39SPeter AvalosYou shouldn't use this option unless you realize how insecure 2196b384f39SPeter Avalosuse of this option is. 220c09f92d2SPeter Avalos.It Fl m , Fl Fl preserve-modification-time 22160b4ad09SPeter Avalos(i and p modes) 22260b4ad09SPeter AvalosSet file modification time on created files to match 22360b4ad09SPeter Avalosthose in the source. 224c09f92d2SPeter Avalos.It Fl n , Fl Fl numeric-uid-gid 2258029ab02SPeter Avalos(i mode, only with 2268029ab02SPeter Avalos.Fl t ) 2278029ab02SPeter AvalosDisplay numeric uid and gid. 2288029ab02SPeter AvalosBy default, 2298029ab02SPeter Avalos.Nm 2308029ab02SPeter Avalosdisplays the user and group names when they are provided in the 2318029ab02SPeter Avalosarchive, or looks up the user and group names in the system 2328029ab02SPeter Avalospassword database. 233c09f92d2SPeter Avalos.It Fl Fl no-preserve-owner 2349c82a63eSPeter Avalos(i mode only) 2359c82a63eSPeter AvalosDo not attempt to restore file ownership. 2369c82a63eSPeter AvalosThis is the default when run by non-root users. 23760b4ad09SPeter Avalos.It Fl O Ar file 23860b4ad09SPeter AvalosWrite archive to 23960b4ad09SPeter Avalos.Ar file . 240c09f92d2SPeter Avalos.It Fl o , Fl Fl create 24160b4ad09SPeter AvalosOutput mode. 24260b4ad09SPeter AvalosSee above for description. 243c09f92d2SPeter Avalos.It Fl p , Fl Fl pass-through 24460b4ad09SPeter AvalosPass-through mode. 24560b4ad09SPeter AvalosSee above for description. 246c09f92d2SPeter Avalos.It Fl Fl preserve-owner 2479c82a63eSPeter Avalos(i mode only) 2489c82a63eSPeter AvalosRestore file ownership. 2499c82a63eSPeter AvalosThis is the default when run by the root user. 250c09f92d2SPeter Avalos.It Fl Fl quiet 25160b4ad09SPeter AvalosSuppress unnecessary messages. 252c09f92d2SPeter Avalos.It Fl R Oo user Oc Ns Oo : Oc Ns Oo group Oc , Fl Fl owner Oo user Oc Ns Oo : Oc Ns Oo group Oc 25360b4ad09SPeter AvalosSet the owner and/or group on files in the output. 25460b4ad09SPeter AvalosIf group is specified with no user 25560b4ad09SPeter Avalos(for example, 25660b4ad09SPeter Avalos.Fl R Ar :wheel ) 25760b4ad09SPeter Avalosthen the group will be set but not the user. 25860b4ad09SPeter AvalosIf the user is specified with a trailing colon and no group 25960b4ad09SPeter Avalos(for example, 26060b4ad09SPeter Avalos.Fl R Ar root: ) 26160b4ad09SPeter Avalosthen the group will be set to the user's default group. 26260b4ad09SPeter AvalosIf the user is specified with no trailing colon, then 26360b4ad09SPeter Avalosthe user will be set but not the group. 26460b4ad09SPeter AvalosIn 26560b4ad09SPeter Avalos.Fl i 26660b4ad09SPeter Avalosand 26760b4ad09SPeter Avalos.Fl p 26860b4ad09SPeter Avalosmodes, this option can only be used by the super-user. 26960b4ad09SPeter Avalos(For compatibility, a period can be used in place of the colon.) 27060b4ad09SPeter Avalos.It Fl r 27160b4ad09SPeter Avalos(All modes.) 27260b4ad09SPeter AvalosRename files interactively. 27360b4ad09SPeter AvalosFor each file, a prompt is written to 27460b4ad09SPeter Avalos.Pa /dev/tty 27560b4ad09SPeter Avaloscontaining the name of the file and a line is read from 27660b4ad09SPeter Avalos.Pa /dev/tty . 27760b4ad09SPeter AvalosIf the line read is blank, the file is skipped. 27860b4ad09SPeter AvalosIf the line contains a single period, the file is processed normally. 27960b4ad09SPeter AvalosOtherwise, the line is taken to be the new name of the file. 280c09f92d2SPeter Avalos.It Fl t , Fl Fl list 28160b4ad09SPeter Avalos(i mode only) 28260b4ad09SPeter AvalosList the contents of the archive to stdout; 28360b4ad09SPeter Avalosdo not restore the contents to disk. 284c09f92d2SPeter Avalos.It Fl u , Fl Fl unconditional 28560b4ad09SPeter Avalos(i and p modes) 28660b4ad09SPeter AvalosUnconditionally overwrite existing files. 28760b4ad09SPeter AvalosOrdinarily, an older file will not overwrite a newer file on disk. 288c09f92d2SPeter Avalos.It Fl V , Fl Fl dot 289c09f92d2SPeter AvalosPrint a dot to stderr for each file as it is processed. 290c09f92d2SPeter AvalosSuperseded by 291c09f92d2SPeter Avalos.Fl v . 292c09f92d2SPeter Avalos.It Fl v , Fl Fl verbose 29360b4ad09SPeter AvalosPrint the name of each file to stderr as it is processed. 29460b4ad09SPeter AvalosWith 29560b4ad09SPeter Avalos.Fl t , 29660b4ad09SPeter Avalosprovide a detailed listing of each file. 297c09f92d2SPeter Avalos.It Fl Fl version 29860b4ad09SPeter AvalosPrint the program version information and exit. 29960b4ad09SPeter Avalos.It Fl y 30060b4ad09SPeter Avalos(o mode only) 30160b4ad09SPeter AvalosCompress the archive with bzip2-compatible compression before writing it. 30260b4ad09SPeter AvalosIn input mode, this option is ignored; 30360b4ad09SPeter Avalosbzip2 compression is recognized automatically on input. 30460b4ad09SPeter Avalos.It Fl Z 30560b4ad09SPeter Avalos(o mode only) 30660b4ad09SPeter AvalosCompress the archive with compress-compatible compression before writing it. 30760b4ad09SPeter AvalosIn input mode, this option is ignored; 30860b4ad09SPeter Avaloscompression is recognized automatically on input. 30960b4ad09SPeter Avalos.It Fl z 31060b4ad09SPeter Avalos(o mode only) 31160b4ad09SPeter AvalosCompress the archive with gzip-compatible compression before writing it. 31260b4ad09SPeter AvalosIn input mode, this option is ignored; 31360b4ad09SPeter Avalosgzip compression is recognized automatically on input. 31460b4ad09SPeter Avalos.El 315c09f92d2SPeter Avalos.Sh EXIT STATUS 316c09f92d2SPeter Avalos.Ex -std 31760b4ad09SPeter Avalos.Sh ENVIRONMENT 31860b4ad09SPeter AvalosThe following environment variables affect the execution of 31960b4ad09SPeter Avalos.Nm : 32060b4ad09SPeter Avalos.Bl -tag -width ".Ev BLOCKSIZE" 32160b4ad09SPeter Avalos.It Ev LANG 32260b4ad09SPeter AvalosThe locale to use. 32360b4ad09SPeter AvalosSee 32460b4ad09SPeter Avalos.Xr environ 7 32560b4ad09SPeter Avalosfor more information. 32660b4ad09SPeter Avalos.It Ev TZ 32760b4ad09SPeter AvalosThe timezone to use when displaying dates. 32860b4ad09SPeter AvalosSee 32960b4ad09SPeter Avalos.Xr environ 7 33060b4ad09SPeter Avalosfor more information. 33160b4ad09SPeter Avalos.El 33260b4ad09SPeter Avalos.Sh EXAMPLES 33360b4ad09SPeter AvalosThe 33460b4ad09SPeter Avalos.Nm 335c09f92d2SPeter Avaloscommand is traditionally used to copy file hierarchies in conjunction 33660b4ad09SPeter Avaloswith the 33760b4ad09SPeter Avalos.Xr find 1 33860b4ad09SPeter Avaloscommand. 33960b4ad09SPeter AvalosThe first example here simply copies all files from 34060b4ad09SPeter Avalos.Pa src 34160b4ad09SPeter Avalosto 34260b4ad09SPeter Avalos.Pa dest : 34360b4ad09SPeter Avalos.Dl Nm find Pa src | Nm Fl pmud Pa dest 34460b4ad09SPeter Avalos.Pp 34560b4ad09SPeter AvalosBy carefully selecting options to the 34660b4ad09SPeter Avalos.Xr find 1 34760b4ad09SPeter Avaloscommand and combining it with other standard utilities, 34860b4ad09SPeter Avalosit is possible to exercise very fine control over which files are copied. 34960b4ad09SPeter AvalosThis next example copies files from 35060b4ad09SPeter Avalos.Pa src 35160b4ad09SPeter Avalosto 35260b4ad09SPeter Avalos.Pa dest 35360b4ad09SPeter Avalosthat are more than 2 days old and whose names match a particular pattern: 35460b4ad09SPeter Avalos.Dl Nm find Pa src Fl mtime Ar +2 | Nm grep foo[bar] | Nm Fl pdmu Pa dest 35560b4ad09SPeter Avalos.Pp 35660b4ad09SPeter AvalosThis example copies files from 35760b4ad09SPeter Avalos.Pa src 35860b4ad09SPeter Avalosto 35960b4ad09SPeter Avalos.Pa dest 36060b4ad09SPeter Avalosthat are more than 2 days old and which contain the word 36160b4ad09SPeter Avalos.Do foobar Dc : 36260b4ad09SPeter Avalos.Dl Nm find Pa src Fl mtime Ar +2 | Nm xargs Nm grep -l foobar | Nm Fl pdmu Pa dest 36360b4ad09SPeter Avalos.Sh COMPATIBILITY 36460b4ad09SPeter AvalosThe mode options i, o, and p and the options 36560b4ad09SPeter Avalosa, B, c, d, f, l, m, r, t, u, and v comply with SUSv2. 36660b4ad09SPeter Avalos.Pp 36760b4ad09SPeter AvalosThe old POSIX.1 standard specified that only 36860b4ad09SPeter Avalos.Fl i , 36960b4ad09SPeter Avalos.Fl o , 37060b4ad09SPeter Avalosand 37160b4ad09SPeter Avalos.Fl p 37260b4ad09SPeter Avaloswere interpreted as command-line options. 37360b4ad09SPeter AvalosEach took a single argument of a list of modifier 37460b4ad09SPeter Avaloscharacters. 37560b4ad09SPeter AvalosFor example, the standard syntax allows 37660b4ad09SPeter Avalos.Fl imu 37760b4ad09SPeter Avalosbut does not support 37860b4ad09SPeter Avalos.Fl miu 37960b4ad09SPeter Avalosor 38060b4ad09SPeter Avalos.Fl i Fl m Fl u , 38160b4ad09SPeter Avalossince 38260b4ad09SPeter Avalos.Ar m 38360b4ad09SPeter Avalosand 38460b4ad09SPeter Avalos.Ar u 38560b4ad09SPeter Avalosare only modifiers to 38660b4ad09SPeter Avalos.Fl i , 38760b4ad09SPeter Avalosthey are not command-line options in their own right. 38860b4ad09SPeter AvalosThe syntax supported by this implementation is backwards-compatible 38960b4ad09SPeter Avaloswith the standard. 39060b4ad09SPeter AvalosFor best compatibility, scripts should limit themselves to the 39160b4ad09SPeter Avalosstandard syntax. 39260b4ad09SPeter Avalos.Sh SEE ALSO 39360b4ad09SPeter Avalos.Xr bzip2 1 , 39460b4ad09SPeter Avalos.Xr gzip 1 , 39560b4ad09SPeter Avalos.Xr mt 1 , 39660b4ad09SPeter Avalos.Xr pax 1 , 397085658deSDaniel Fojt.Xr tar 1 , 39860b4ad09SPeter Avalos.Xr libarchive 3 , 39960b4ad09SPeter Avalos.Xr cpio 5 , 40060b4ad09SPeter Avalos.Xr libarchive-formats 5 , 40160b4ad09SPeter Avalos.Xr tar 5 40260b4ad09SPeter Avalos.Sh STANDARDS 40360b4ad09SPeter AvalosThere is no current POSIX standard for the cpio command; it appeared 40460b4ad09SPeter Avalosin 40560b4ad09SPeter Avalos.St -p1003.1-96 40660b4ad09SPeter Avalosbut was dropped from 40760b4ad09SPeter Avalos.St -p1003.1-2001 . 40860b4ad09SPeter Avalos.Pp 40960b4ad09SPeter AvalosThe cpio, ustar, and pax interchange file formats are defined by 41060b4ad09SPeter Avalos.St -p1003.1-2001 41160b4ad09SPeter Avalosfor the pax command. 41260b4ad09SPeter Avalos.Sh HISTORY 41360b4ad09SPeter AvalosThe original 41460b4ad09SPeter Avalos.Nm cpio 41560b4ad09SPeter Avalosand 41660b4ad09SPeter Avalos.Nm find 41760b4ad09SPeter Avalosutilities were written by Dick Haight 41860b4ad09SPeter Avaloswhile working in AT&T's Unix Support Group. 41960b4ad09SPeter AvalosThey first appeared in 1977 in PWB/UNIX 1.0, the 42060b4ad09SPeter Avalos.Dq Programmer's Work Bench 42160b4ad09SPeter Avalossystem developed for use within AT&T. 42260b4ad09SPeter AvalosThey were first released outside of AT&T as part of System III Unix in 1981. 42360b4ad09SPeter AvalosAs a result, 42460b4ad09SPeter Avalos.Nm cpio 42560b4ad09SPeter Avalosactually predates 42660b4ad09SPeter Avalos.Nm tar , 42760b4ad09SPeter Avaloseven though it was not well-known outside of AT&T until some time later. 42860b4ad09SPeter Avalos.Pp 42960b4ad09SPeter AvalosThis is a complete re-implementation based on the 43060b4ad09SPeter Avalos.Xr libarchive 3 43160b4ad09SPeter Avaloslibrary. 43260b4ad09SPeter Avalos.Sh BUGS 43360b4ad09SPeter AvalosThe cpio archive format has several basic limitations: 43460b4ad09SPeter AvalosIt does not store user and group names, only numbers. 43560b4ad09SPeter AvalosAs a result, it cannot be reliably used to transfer 43660b4ad09SPeter Avalosfiles between systems with dissimilar user and group numbering. 43760b4ad09SPeter AvalosOlder cpio formats limit the user and group numbers to 43860b4ad09SPeter Avalos16 or 18 bits, which is insufficient for modern systems. 43960b4ad09SPeter AvalosThe cpio archive formats cannot support files over 4 gigabytes, 44060b4ad09SPeter Avalosexcept for the 44160b4ad09SPeter Avalos.Dq odc 44260b4ad09SPeter Avalosvariant, which can support files up to 8 gigabytes. 443