advantages of cpio command?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers advantages of cpio command?
# 1  
Old 08-18-2008
advantages of cpio command?

hi,
can any body tell me the advantages of having cpio command over tar command
# 2  
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.
# 3  
Old 08-18-2008
Definitely not true. A plain tar file is not compressed.
# 4  
Old 08-18-2008
Ok era you're right. I rephrase, tar can create compressed files (bzip2 // gzip) whereas cpio cannot
# 5  
Old 08-18-2008
Historically no such distinction existed. I'd also be interested in learning why there were two mostly overlapping applications. My hunch is that tar was originally geared towards tapes and cpio towards file archives, but that's just a conjecture.

http://rightsock.com/~kjw/Ramblings/tar_v_cpio.html might help the original poster, but doesn't really answer the question why they both exist.
# 6  
Old 08-18-2008
Interesting link era, but IMHO I wouldn't say cpio is better. Nowadays they're just used for different purposes. When I want to backup a disk so that I can rapidly create several disks based on that image I use cpio or dd. On the contrary if I want to pack several log files I usually go for tar/bz2.
# 7  
Old 08-18-2008
Historicaly tar could not archive special files, and you were doomed if you had plenty links...
So to move filesystems around (those were the days when you could not extend filesystems...) you would use cpio (and I sitll do so...) - alike options: -pduml
On the other hand cpio had so many other options that, if you coulnt remember how it was cpio-ed, you could not retrieve the content.. (ah so glad when you find a tar file after having read 50 cpio tapes but could not restore, and dont laugh, it happened to me when a site in need of support called me for help...)
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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

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

7. 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

8. 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

9. 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
Login or Register to Ask a Question