Sponsored Content
Full Discussion: advantages of cpio command?
Top Forums UNIX for Dummies Questions & Answers advantages of cpio command? Post 302226077 by redoubtable on Monday 18th of August 2008 06:07:40 AM
Old 08-18-2008
cpio just puts together a group of files / directories (archive) that then can be extracted in that exact way with no compression.

tar creates a compressed archive.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cpio command with compress

Hi friends.. I want to be able to copy a file from one location to another (locally). The location the files are copied to should have compressed instances of the files they were copied from. copy from /home/user/test.file copy to /backup/user/test.file.Z I need to be able to do this... (1 Reply)
Discussion started by: sureshy
1 Replies

2. UNIX for Dummies Questions & Answers

Linux advantages?

Hello to help me with my studying of unix/linux outside of work I was thinking of installing Linux at home aswell as using Windows XP. Im pretty new to Linux and Unix, could someone tell me the possible benifits or even negatives of running Linux at home as an opperating system as opposed to... (2 Replies)
Discussion started by: Loaded Gun
2 Replies

3. UNIX for Dummies Questions & Answers

Advantages of Groups

What are the advantages of putting users into groups? I understand that in a corporate environment, you should create a group for each department. ie: putting finance employees into a finance group. But are there any system advantages for doing that? How would it make it easier on the system... (3 Replies)
Discussion started by: kurtmc
3 Replies

4. UNIX for Dummies Questions & Answers

Restoring a directory using cpio command?

I am confused with how to restore archives. I just figured out the use of tar, but now after trying it with cpio, I'm unsure of some things. Firstly, is it necessary to cd to the directory you will be restoring to in order to run this command? Secondly, what is it I'm doing wrong when trying to... (2 Replies)
Discussion started by: Relykk
2 Replies

5. Shell Programming and Scripting

advantages of Perl ?

What is the advantages of Perl in Unix environnement. Is it for scripts ? Text manipulation ? Have you a Concrete exemple of perl utilisation. Thanks you (3 Replies)
Discussion started by: simquest
3 Replies

6. UNIX for Dummies Questions & Answers

Using cpio with the find command

Hey everyone, I’ am a newbie to Unix. Learning some of the basic commands. I did some piping before like who | wc I wanted to practice some backup features in Unix. I’ am practicing using cpio and place it into a file named backup. I’m not quite sure where I’ am going wrong? ... (1 Reply)
Discussion started by: fox987
1 Replies

7. UNIX for Dummies Questions & Answers

What are some advantages of Unix?

What are some advantage's of Unix (3 Replies)
Discussion started by: alvin2132
3 Replies

8. Solaris

About cpio command

i need to extract cpio file archived full path to /restore/ (not full path or fullpath under this directory ) i can't find option for cpio please help me example. i have cpio file archive /etc/* and i need to extract file to /restore #cpio -ivBcdmu < xx.cpio but data from cpio not... (3 Replies)
Discussion started by: infjustice
3 Replies

9. UNIX for Advanced & Expert Users

Cpio - input files (from list) are stored in different order inside cpio archive - why?

Due to budget constraints I have to reinvent an Enterprise backup system in a SPARC (sun4v) Solaris estate (10 & 11). (yep - reinvent wheel, fun but time consuming. Is this wise?! :confused: ) For each filesystem of interest, to try to capture a 'catalog' at the front of each cpio archive (for... (1 Reply)
Discussion started by: am115998
1 Replies
CPIO(1) 						    BSD General Commands Manual 						   CPIO(1)

NAME
cpio -- copy file archives in and out SYNOPSIS
cpio -o [-AaBcLvZz] [-C bytes] [-F archive] [-H format] [-O archive] < name-list [> archive] cpio -i [-6BbcdfmrSstuvZz] [-C bytes] [-E file] [-F archive] [-H format] [-I archive] [pattern ...] [< archive] cpio -p [-adLlmuv] destination-directory < name-list DESCRIPTION
The cpio command copies files to and from a cpio archive. If the archive is of the form: [[user@]host:]file then the archive will be pro- cessed using rmt(8). The options are as follows: -o, --create Create an archive. Reads the list of files to store in the archive from standard input, and writes the archive on standard output. -a, --reset-access-time Reset the access times on files that have been copied to the archive. -A, --append Append to the specified archive. -B Set block size of output to 5120 bytes. -c Use ASCII format for cpio header for portability. -C bytes Set the block size of output to bytes. -F archive -O archive Use the specified file name as the archive to write to. -H format Write the archive in the specified format. Recognized formats are: bcpio Old binary cpio format. cpio Old octal character cpio format. sv4cpio SVR4 hex cpio format. tar Old tar format. ustar POSIX ustar format. -L Follow symbolic links. -v Be verbose about operations. List filenames as they are written to the archive. --xz Compress/decompress archive using xz(1) format. -Z Compress archive using compress(1) format. -z Compress/decompress archive using gzip(1) format. -i, --extract Restore files from an archive. Reads the archive file from standard input and extracts files matching the patterns that were speci- fied on the command line. -b Do byte and word swapping after reading in data from the archive, for restoring archives created on systems with a different byte order. -B Set the block size of the archive being read to 5120 bytes. -c Expect the archive headers to be in ASCII format. -C bytes Read archive written with a block size of bytes. -d, --make-directories Create any intermediate directories as needed during restore. -E file, --pattern-file file Read list of file name patterns to extract or list from file. -f, --nonmatching Restore all files except those matching the patterns given on the command line. -F archive, --file archive -I archive Use the specified file as the input for the archive. -H format, --format format Read an archive of the specified format. Recognized formats are: bcpio Old binary cpio format. cpio Old octal character cpio format. sv4cpio SVR4 hex cpio format. tar Old tar format. ustar POSIX ustar format. -m Restore modification times on files. -r, --rename Rename restored files interactively. -s Swap bytes after reading data from the archive. -S, --swap-halfwords Swap words after reading data from the archive. -t, --list Only list the contents of the archive, no files or directories will be created. -u, --unconditional Overwrite files even when the file in the archive is older than the one that will be overwritten. -v, --verbose Be verbose about operations. List filenames as they are copied in from the archive. -z Uncompress archive using gzip(1) format. -Z Uncompress archive using compress(1) format. -6 Process old-style cpio format archives. -p, --pass-through Copy files from one location to another in a single pass. The list of files to copy are read from standard input and written out to a directory relative to the specified directory argument. -a Reset the access times on files that have been copied. -d Create any intermediate directories as needed to write the files at the new location. -l, --link When possible, link files rather than creating an extra copy. -L, --dereference Follow symbolic links. -m, --preserve-modification-time Restore modification times on files. -u, --unconditional Overwrite files even when the original file being copied is older than the one that will be overwritten. -v, --verbose Be verbose about operations. List filenames as they are copied. --force-local Do not interpret filenames that contain a ':' as remote files. --insecure Normally cpio ignores filenames that contain ``..'' as a path component. With this option, files that contain ``..'' can be processed. EXIT STATUS
cpio will exit with one of the following values: 0 All files were processed successfully. 1 An error occurred. Whenever cpio cannot create a file or a link when extracting an archive or cannot find a file while writing an archive, or cannot preserve the user ID, group ID, file mode, or access and modification times when the -p option is specified, a diagnostic message is written to stan- dard error and a non-zero exit value will be returned, but processing will continue. In the case where cpio cannot create a link to a file, cpio will not create a second copy of the file. If the extraction of a file from an archive is prematurely terminated by a signal or error, cpio may have only partially extracted the file the user wanted. Additionally, the file modes of extracted files and directories may have incorrect file bits, and the modification and access times may be wrong. If the creation of an archive is prematurely terminated by a signal or error, cpio may have only partially created the archive which may vio- late the specific archive format specification. SEE ALSO
pax(1), tar(1) AUTHORS
Keith Muller at the University of California, San Diego. BUGS
The -s and -S options are currently not implemented. BSD
June 18, 2011 BSD
All times are GMT -4. The time now is 08:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy