Difference between 'pax', 'tar', and cpio


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Difference between 'pax', 'tar', and cpio
# 8  
Old 03-10-2011
Quote:
Originally Posted by methyl
Standard "cpio", "tar" and "pax" have a 2Gb maximum size of any one file.
standard "tar" has a much bigger limit now, but old versions persist in many places.

Of course PAX supports large files. It's not a modern restandardization of something old, it's a brand-new archiver invented by IEEE&POSIX and decreed by POSIX to support all the modern extensions for tar as well as it's own pax format. I suspect because they'd have to pry some distributor's mouldy old tar implementations from their cold dead fingers to get USTAR implemented anywhere else.

Of course, it being an actually portable archiver, nobody installs it Smilie

Last edited by Corona688; 03-10-2011 at 12:23 PM..
# 9  
Old 03-10-2011
Hi.

I just noticed that one of the archivers available in GNU/Linux Debian (lenny) is:
Code:
Description: tar(1) from FreeBSD, using libarchive
 The bsdtar program has a number of advantages over previous tar
 implementations:
 .
  * Library. Since the core functionality is in a library, it can be
    used by other tools, such as pkg_add.
 .
  * Automatic format detection. Libarchive automatically detects the
    compression (none/gzip/bzip2) and format (old tar, ustar, gnutar,
    pax, cpio, iso9660, zip) when reading archives. It does this for
    any data source.
 .
  * Pax Interchange Format Support. This is a POSIX/SUSv3 extension to
    the old "ustar" tar format that adds arbitrary extended attributes
    to each entry. Does everything that GNU tar format does, only
    better.
 .
  * Handles file flags, ACLs, arbitrary pathnames, etc. Pax interchange
    format supports key/value attributes using an easily-extensible
    technique. Arbitrary pathnames, group names, user names, file sizes
    are part of the POSIX standard; libarchive extends this with
    support for file flags, ACLs, and arbitrary device numbers.

Looks like a super-set of even PAX. Nothing is mentioned explicitly about sizes handled, and I have been able to get by with GNUtar, so I have no direct experience with bsdtar ... cheers, drl
# 10  
Old 03-15-2011
tar is the best choice as it works well for the purpose. The cpio has some advantages when compared to tar , but it is quite complicated to control the use. The pax is not interesting one for me though it implements least privilege protections for memory pages and i have well experience with tar. One of the essay writing service attempt based on this items cleared some benefits of tar that actually works greatly for me. The selection also depends on several tasks that each one needs to accomplish.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 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. UNIX for Dummies Questions & Answers

Explain difference of tar command

Hello All, I have been seeing a weird(at least for me, at this point) issue with a specific tar command. 1st fashion) Normally, if i have to tar anything at the command line I tend to use tar -cvzf <tar-file_name.tgz> <directory_to_be_tarred> this command works perfectly fine with out... (1 Reply)
Discussion started by: getnetha
1 Replies

3. Shell Programming and Scripting

Help with tar/pax

Hi, I have tar ball "data.tar" which consists of many files from different directories. If I untar a file using following command, it will untar file to location /input/data tar -xvf data.tar /input/data/abc.txt I want the file to be untar in current directory and or any other... (3 Replies)
Discussion started by: pinnacle
3 Replies

4. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

5. UNIX for Dummies Questions & Answers

tar/cpio/pax read patterns from stdin

tar has the -T operand for reading patterns from a file. Is there any way to read patterns from stdin, without creating a temp file? I would like to avoid iterating over the archive repeatedly (e.g. with a loop or xargs) as this is a large archive and we're only extracting a small number of... (2 Replies)
Discussion started by: uiop44
2 Replies

6. Shell Programming and Scripting

pax me out

hi I am using this command pax -f /Unix/codes/code.tar -r -s::/Unix/archive: objective is to transfer tar file /Unix/codes/code.tar to /Unix/archive with untarring done . For this reason i am using pax and not tar -xvf as we cant specify untarred destination in that the problem is... (2 Replies)
Discussion started by: ultimatix
2 Replies

7. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

8. AIX

MKSYSB + tar / on same server: difference and useless ?

Hi again, we have several types of backups we do here. On the workstations backups that we do every 3 months, we do 2 backups on each ones: mksysb and a TAR /. I need to understand better what that mksysb does and figure out if doing both is useless where only one is enough I am looking at... (1 Reply)
Discussion started by: Browser_ice
1 Replies

9. UNIX for Advanced & Expert Users

pax help

we created a TAR file ( souce /opt/oracle/10.2) . If we want to extract it diff directory say (/tmp) . I know we can use pax to do this .but inside TAR we have absolute path ref . if we pax does it replaces absolute path in TAR ? Thanks (1 Reply)
Discussion started by: talashil
1 Replies

10. UNIX for Dummies Questions & Answers

Solaris and PAX

I am having trouble with the pax command on Saris. I want to sue it to untar a file to a different directory. So if mytar.tar conatins files that were in /u02/mydir/mydir2/mydir3, I want to untar them to /export/home/mydir. An example I have is: pax -r -s... (2 Replies)
Discussion started by: hshapiro
2 Replies
Login or Register to Ask a Question