CPIO vs TAR ??? what is the differnce??

CPIO vs TAR ??? what is the differnce??

Post by Rick L » Thu, 05 Oct 1995 04:00:00



I know they both compress files  into a main
file, but what is the advantage of one vs. the
other ??

TIA

--
The wealth of reality, cannot be seen from your locality.

 
 
 

CPIO vs TAR ??? what is the differnce??

Post by Gary Seuber » Thu, 05 Oct 1995 04:00:00



>I know they both compress files  into a main
>file, but what is the advantage of one vs. the
>other ??

>TIA

>--
>The wealth of reality, cannot be seen from your locality.

I'm sure many others will post the actual list of differences between 'tar'
(Tape ARchiver) and 'cpio' (CoPy Input/Output).  I just wanted to point out
that neither does a compress!  Standard UNIX logic (not always agreed with)
is that each command should do a single job well.  Thus, 'tar' and 'cpio' can
create archives of files but 'compress' (or 'pack' or ...) is needed to
compress
them.   :-}
--

Gary Seubert
UNIX Class of '73 B.C. ('B'efore 'C'pio) [& before 'tar' for that matter!]

 
 
 

CPIO vs TAR ??? what is the differnce??

Post by Rich K » Thu, 05 Oct 1995 04:00:00




>I know they both compress files  into a main
>file, but what is the advantage of one vs. the
>other ??

 short answer man cpio and man tar.

 cpio copies list of files; while tar can copy whole directories and subdirectories.

  richk

Quote:

>TIA

>--
>The wealth of reality, cannot be seen from your locality.

 
 
 

CPIO vs TAR ??? what is the differnce??

Post by Ravi Kum » Fri, 06 Oct 1995 04:00:00




Quote:

>I know they both compress files  into a main
>file, but what is the advantage of one vs. the
>other ??

>TIA

Greetings,

This has long been a bone of contention for many system admins.
Which way to archive? 'tar' or 'cpio'.  I personally prefer
'cpio'. The 'tar' I am referencing below is not GNU 'tar',
which has more exteneded features and options.  A generic
'tar' vs generic 'cpio'.

tar                                     cpio
===                                     ====

Common to all UNIX flavors              Mostly for AT&Tish
                                        ,available on BSD systems.

Most of the tar's dont support          Writes multiple copies of
symbolic links                          links to tape

Can archive individual files            ditto

No multiple tape volumes                ditto

Backups are larger                      Backups are smaller, because of
                                        the smaller headers.

Read/write from a tape drive is         slower, the I/O block size is
faster, the max I/O block size is       5120 bytes.
10240 bytes.

Padding to even out block boundary      No padding.

Can not read or write device files      Can backup the file information
                                        but only headers. (Flames??)

Hierarchies can be a bottleneck, for    Filenames > 100 chars., is a problem.
the path length beyond 100 chars.,
is not easy to handle  

More portable                           Less portable.

Entire directory trees can be moved     Can be moved more easily with 'find'

Easy to use                             A little more tougher to use than
                                        'tar', but more options.
---------------------------------------------------------------------------------

I wish some more people contribute to this so I can post a summary.

Thanks

Ravi Kumar

--------------------------------------------------------------------------
Internet Systems Engineer                       HBO and Company
                                                303, Perimeter Center (N)
                                                Atlanta GA 30346
--------------------------------------------------------------------------

 
 
 

CPIO vs TAR ??? what is the differnce??

Post by Stephen M. Du » Sun, 08 Oct 1995 04:00:00



$I know they both compress files  into a main
$file, but what is the advantage of one vs. the
$other ??

   Actually, in most implementations, _neither_ one compresses.
They do _archive_ files together, but compression is a different
kettle of fish entirely.

   There are some compatibility issues with them, for example;
in many cases, cpio -c format is more likely to be portable
across dissimilar systems than cpio or tar format.  But as always,
there are exceptions, I'm quite sure.

   Also, some implementations of one command or another may suffer
from bugs or other problems.  For example, SCO's tar (at least
in 3.2v4.2 and below; I'm not sure about the present one) won't
back up neat things like device nodes.
--

----------------------------------------------------------------------------
Stephen M. Dunn, CNE, ACE, Sr. Systems Analyst, United System Solutions Inc.
104 Carnforth Road, Toronto, ON, Canada M4A 2K7          (416) 750-7946 x251

 
 
 

CPIO vs TAR ??? what is the differnce??

Post by Owen He » Thu, 12 Oct 1995 04:00:00



> $I know they both compress files  into a main
> $file, but what is the advantage of one vs. the
> $other ??

[snip]

Quote:

>    There are some compatibility issues with them, for example;
> in many cases, cpio -c format is more likely to be portable
> across dissimilar systems than cpio or tar format.  But as always,
> there are exceptions, I'm quite sure.

>    Also, some implementations of one command or another may suffer
> from bugs or other problems.  For example, SCO's tar (at least
> in 3.2v4.2 and below; I'm not sure about the present one) won't
> back up neat things like device nodes.

I haven't heard anyone mention what I consider the biggest reason *not* to
use tar (although I still do): Tar writes out one file whereas cpio copies
each file to the destination.  This means tar is more susceptible to bad
tape blocks than cpio is -- one bad block on the tar tape and you lose
your whole backup!

Regards,

Bret
 ____________________________________________________________________________

 Technical Director, WebNet Technologies      URL: http://www.wn.com
 Voice/FAX: 214.821.0848                      Pager: 214.816.0283
 ____________________________________________________________________________

 
 
 

CPIO vs TAR ??? what is the differnce??

Post by Max Heffl » Sat, 14 Oct 1995 04:00:00



Quote:>   Also, some implementations of one command or another may suffer
>from bugs or other problems.  For example, SCO's tar (at least
>in 3.2v4.2 and below; I'm not sure about the present one) won't
>back up neat things like device nodes.

Or symbolic links
--

Home page: http://www.texmicro.com/~max - (an exercise in egomania)
  ___________________________________________________
  / // /// // /// // /// // /// // /// // /// // ///
 ---------------------------------------------------
 
 
 

1. tape battle: tar vs afio vs cpio vs..

 I have a newbie question. I just put in a scsi external 24gb DAT drive
and it works great. I am now putting together the backup scripts and
wanted to know what veterans recommend. Right now it seems afio is winning
the battle because it compresses individual files. Are there any lesser
known programs out there that are gems?

2. Strange FTP problem

3. ?cpio vs tar vs dump

4. Turning numlock on under XFree 3.3.5

5. Archive times: cpio vs tar vs backup

6. HELP: Broken lowlevel sound in 2.1.10[12]

7. Tar Vs. Cpio

8. IP masq or IPchains or what else

9. tar vs cpio

10. CPIO vs TAR which is better

11. tar vs. cpio

12. tar vs. cpio when copying a partition: Which is better?

13. backups tar .vs. cpio