Compressie – Cpio (software)
Informatie (ENG):
cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. The software utility was originally intended as a tape archiving program as part of the Programmer’s Workbench (PWB/UNIX), and has been a component of virtually every Unix operating system released thereafter. Its name is derived from the phrase copy in and out, in close description of the program’s use of standard input and standard output in its operation.
All variants of Unix also support other backup and archiving programs, such as tar, which has become more widely recognized.[1] The use of cpio by the RPM Package Manager, in the initramfs program of Linux kernel2.6, and in Apple Computer’s Installer (pax) make cpio an important archiving tool.
Since its original design, cpio and its archive file format have undergone several, sometimes incompatible, revisions. Most notable is the change, now an operational option, from the use of a binary format of archive file meta information to an ASCII-based representation.
Bron: Wikipedia
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
Usage: cpio [OPTION...] [destination-directory] GNU `cpio' copies files to and from archives Examples: # Copy files named in name-list to the archive cpio -o < name-list [> archive] # Extract files from the archive cpio -i [< archive] # Copy files named in name-list to destination-directory cpio -p destination-directory < name-list Main operation mode: -i, --extract Extract files from an archive (run in copy-in mode) -o, --create Create the archive (run in copy-out mode) -p, --pass-through Run in copy-pass mode -t, --list Print a table of contents of the input Operation modifiers valid in any mode: --block-size=BLOCK-SIZE Set the I/O block size to BLOCK-SIZE * 512 bytes -B Set the I/O block size to 5120 bytes -c Use the old portable (ASCII) archive format -C, --io-size=NUMBER Set the I/O block size to the given NUMBER of bytes -D, --directory=DIR Change to directory DIR --force-local Archive file is local, even if its name contains colons -H, --format=FORMAT Use given archive FORMAT --quiet Do not print the number of blocks copied -R, --owner=[USER][:.][GROUP] Set the ownership of all files created to the specified USER and/or GROUP -v, --verbose Verbosely list the files processed -V, --dot Print a "." for each file processed -W, --warning=FLAG Control warning display. Currently FLAG is one of 'none', 'truncate', 'all'. Multiple options accumulate. Operation modifiers valid in copy-in and copy-out modes -F, --file=[[USER@]HOST:]FILE-NAME Use this FILE-NAME instead of standard input or output. Optional USER and HOST specify the user and host names in case of a remote archive -M, --message=STRING Print STRING when the end of a volume of the backup media is reached --rsh-command=COMMAND Use COMMAND instead of rsh Operation modifiers valid only in copy-in mode: -b, --swap Swap both halfwords of words and bytes of halfwords in the data. Equivalent to -sS -f, --nonmatching Only copy files that do not match any of the given patterns -I [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard input. Optional USER and HOST specify the user and host names in case of a remote archive -n, --numeric-uid-gid In the verbose table of contents listing, show numeric UID and GID -r, --rename Interactively rename files -s, --swap-bytes Swap the bytes of each halfword in the files -S, --swap-halfwords Swap the halfwords of each word (4 bytes) in the files --to-stdout Extract files to standard output -E, --pattern-file=FILE Read additional patterns specifying filenames to extract or list from FILE --only-verify-crc When reading a CRC format archive, only verify the CRC's of each file in the archive, don't actually extract the files Operation modifiers valid only in copy-out mode: -A, --append Append to an existing archive. --device-independent, --reproducible Create device-independent (reproducible) archives --ignore-devno Don't store device numbers -O [[USER@]HOST:]FILE-NAME Archive filename to use instead of standard output. Optional USER and HOST specify the user and host names in case of a remote archive --renumber-inodes Renumber inodes Operation modifiers valid only in copy-pass mode: -l, --link Link files instead of copying them, when possible Operation modifiers valid in copy-in and copy-out modes: --absolute-filenames Do not strip file system prefix components from the file names --no-absolute-filenames Create all files relative to the current directory Operation modifiers valid in copy-out and copy-pass modes: -0, --null Filenames in the list are delimited by null characters instead of newlines -a, --reset-access-time Reset the access times of files after reading them -L, --dereference Dereference symbolic links (copy the files that they point to instead of copying the links). Operation modifiers valid in copy-in and copy-pass modes: -d, --make-directories Create leading directories where needed -m, --preserve-modification-time Retain previous file modification times when creating files --no-preserve-owner Do not change the ownership of the files --sparse Write files with large blocks of zeros as sparse files -u, --unconditional Replace all files unconditionally -?, --help give this help list --usage give a short usage message --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. Report bugs to <bug-cpio@gnu.org>. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
2.12 - Improved documentation. - Manpages are installed by make install. - New options for copy-out mode: --ignore-devno, --renumber-inodes, --device-independent, --reproducible. v2.11 - Fix mt build. - In copy-in mode, if directory attributes do not permit writing to it, setting them is delayed until the end of run. This allows to correctly extract files in such directories. - In copy-in mode, permissions of a directory are restored if it appears in the file list after files in it (e.g. in listings produced by find . -depth). This fixes debian bug #458079. - Fix possible memory overflow in the rmt client code (CVE-2010-0624). v2.10 - Ensure record headers are properly packed (fix builds on ARM). - Fix exit codes to reliably indicate success or failure of the operation. - Fix large file support. - Support MinGW builds. - Minor bugfixes. v2.9 - Licensed under the GPLv3. - Bugfixes - Honor umask when creating intermediate directories, not specified in the archive (debian bug #430053). v2.8 - Option --owner can be used in copy-out mode, allowing to uniformly override the ownership of the files being added to the archive. - Bugfixes: - Symlinks were handled incorrectly in copy-out mode. - Fix handling of large files. - Fix setting the file permissions in copy-out mode. - Fix CAN-2005-1111 v2.7 - Improved error checking and diagnostics - Fixed CAN-1999-1572 - Allow to use --sparse in both copy-in and copy-pass. - Fix bug that eventually caused copying out the same hard-linked file several times to archive. - Fix several LFS-related issues. - Fix Debian bug #335580. v2.6 - Added NLS support - Improved configure script - Improved invocation consistency checking and help output - Printing warning about truncation of inode numbers is suppressed by default. - New option --warning (-W) controls the level of output warnings: -Wnone Disables all warnings -Wtruncate Enable warning about truncation of the inode number -Wall Enables all warnings To disable a particular warning, prefix its name with 'no-', just like in gcc. - New option --to-stdout extracts files to standard output. - The output of cpio --help is largely improved. - Bugfixes |
Cpio compileren met Cygwin
1) Installeer Cywin (met de c++ compilers etc.)
2) Pak de source uit in een map, bijvoorbeeld: [CygwinFolder]\home\[NAAM]\cpio-2.12
3) Open cygwin en ga naar de folder met het commmando: cd cpio-2.12
4) Test of je alle onderdelen hebt om te compileren met het commando: ./configure
5) Maak de binairy met het commando: make
6) Zodra het compileren klaar is, is er een cpio.exe bestand aangemaakt in de folder [CygwinFolder]\home\[NAAM]\cpio-2.12\src
7) De volgende bestanden zijn nog nodig voor cpio.exe om te werken (wanneer gecompileerd met cygwin) kopieer deze uit de [CygwinFolder]\bin map:
1 2 3 4 |
cygwin1.dll cyggcc_s-1.dll cygintl-8.dll cygiconv-2.dll |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
make all-recursive make[1]: Map '/home/Blackbird/cpio-2.12' wordt binnengegaan Making all in doc make[2]: Map '/home/Blackbird/cpio-2.12/doc' wordt binnengegaan make[2]: Er hoeft niets gedaan te worden voor 'all'. make[2]: Map '/home/Blackbird/cpio-2.12/doc' wordt verlaten Making all in gnu make[2]: Map '/home/Blackbird/cpio-2.12/gnu' wordt binnengegaan GEN alloca.h GEN configmake.h GEN dirent.h GEN fcntl.h GEN fnmatch.h GEN getopt.h GEN inttypes.h GEN signal.h GEN stddef.h GEN stdio.h GEN stdlib.h GEN string.h GEN strings.h GEN sys/stat.h GEN sys/time.h GEN sys/types.h GEN time.h GEN unistd.h GEN wchar.h GEN wctype.h make all-recursive make[3]: Map '/home/Blackbird/cpio-2.12/gnu' wordt binnengegaan make[4]: Map '/home/Blackbird/cpio-2.12/gnu' wordt binnengegaan CC argmatch.o CC argp-eexst.o CC argp-fmtstream.o CC argp-fs-xinl.o CC argp-help.o CC argp-parse.o CC argp-pvh.o CC argp-xinl.o CC argp-version-etc.o CC bitrotate.o CC c-strcasecmp.o CC c-strncasecmp.o CC cloexec.o CC close-stream.o CC closeout.o CC opendir-safer.o CC dirname.o CC basename.o CC dirname-lgpl.o CC basename-lgpl.o CC stripslash.o CC exitfail.o CC fd-hook.o CC filenamecat-lgpl.o CC full-write.o CC gettime.o CC hash.o CC imaxtostr.o CC inttostr.o CC offtostr.o CC uinttostr.o CC umaxtostr.o CC localcharset.o CC malloca.o CC openat-die.o CC parse-datetime.o CC progname.o CC quotearg.o CC safe-read.o CC safe-write.o CC save-cwd.o CC savedir.o CC stat-time.o CC strnlen1.o CC timespec.o CC unistd.o CC dup-safer.o CC fd-safer.o CC pipe-safer.o CC utimens.o CC version-etc.o CC version-etc-fsf.o CC wctype-h.o CC xmalloc.o CC xalloc-die.o CC xgetcwd.o CC xsize.o CC xstrndup.o CC chdir-long.o CC fcntl.o CC fnmatch.o CC getdtablesize.o CC getopt.o CC getopt1.o CC obstack.o CC openat-proc.o AR libgnu.a make[4]: Map '/home/Blackbird/cpio-2.12/gnu' wordt verlaten make[3]: Map '/home/Blackbird/cpio-2.12/gnu' wordt verlaten make[2]: Map '/home/Blackbird/cpio-2.12/gnu' wordt verlaten Making all in lib make[2]: Map '/home/Blackbird/cpio-2.12/lib' wordt binnengegaan GEN rmt-command.h make all-am make[3]: Map '/home/Blackbird/cpio-2.12/lib' wordt binnengegaan CC exit.o CC exit-status.o CC rtapelib.o CC sysdep.o CC error.o CC names.o AR libpax.a make[3]: Map '/home/Blackbird/cpio-2.12/lib' wordt verlaten make[2]: Map '/home/Blackbird/cpio-2.12/lib' wordt verlaten Making all in rmt make[2]: Map '/home/Blackbird/cpio-2.12/rmt' wordt binnengegaan CC rmt.o CCLD rmt.exe make[2]: Map '/home/Blackbird/cpio-2.12/rmt' wordt verlaten Making all in src make[2]: Map '/home/Blackbird/cpio-2.12/src' wordt binnengegaan CC copyin.o CC copyout.o CC copypass.o CC defer.o CC dstring.o CC global.o CC fatal.o CC main.o CC tar.o CC util.o CC filemode.o CC idcache.o CC makepath.o CC userspec.o CCLD cpio.exe make[2]: Map '/home/Blackbird/cpio-2.12/src' wordt verlaten Making all in po make[2]: Map '/home/Blackbird/cpio-2.12/po' wordt binnengegaan make[2]: Er hoeft niets gedaan te worden voor 'all'. make[2]: Map '/home/Blackbird/cpio-2.12/po' wordt verlaten Making all in tests make[2]: Map '/home/Blackbird/cpio-2.12/tests' wordt binnengegaan make[2]: Er hoeft niets gedaan te worden voor 'all'. make[2]: Map '/home/Blackbird/cpio-2.12/tests' wordt verlaten make[2]: Map '/home/Blackbird/cpio-2.12' wordt binnengegaan make[2]: Map '/home/Blackbird/cpio-2.12' wordt verlaten make[1]: Map '/home/Blackbird/cpio-2.12' wordt verlaten |
Download cpio @ gnu.org
Download cpio voor Windows @ gnuwin32.sourceforge.net
[#/software/cpio” ]