LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 08-22-2007, 03:44 AM   #1
ahmedb72
Member
 
Registered: Jan 2006
Location: Sydney
Distribution: RHEL
Posts: 72

Rep: Reputation: 15
pax versus tar


Hi all,

I'm trying to compare performance of tar and pax utilities. I noticed that pax files are much more in size than tar files. Actually pax files are larger in size than the files contained in the archive file.

Here is what I tried:
Code:
bash-3.00# ls -lh
total 527322
drwxr-xr-x  76 root     root        4.0K Aug 20 23:27 dir1
-rw-r--r--   1 root     root        252M Aug 21 21:55 dir1.pax
drwxr-xr-x   2 root     root         512 Aug 20 23:27 dir2
-rw-r--r--   1 ahmed    root         136 Aug 19 01:37 local.cshrc
-rw-r--r--   1 ahmed    root         157 Aug 19 01:37 local.login
-rw-r--r--   1 ahmed    root         213 Aug 19 01:44 local.profile
-rw------T   1 root     root        5.0M Aug 19 20:59 opening.avi
-rw-r--r--   1 root     root         12K Aug 21 21:55 whos.txt
bash-3.00# rm dir1.pax
bash-3.00# ls
dir1           local.cshrc    local.profile  whos.txt
dir2           local.login    opening.avi
bash-3.00# ls -l
total 10298
drwxr-xr-x  76 root     root        4096 Aug 20 23:27 dir1
drwxr-xr-x   2 root     root         512 Aug 20 23:27 dir2
-rw-r--r--   1 ahmed    root         136 Aug 19 01:37 local.cshrc
-rw-r--r--   1 ahmed    root         157 Aug 19 01:37 local.login
-rw-r--r--   1 ahmed    root         213 Aug 19 01:44 local.profile
-rw------T   1 root     root     5242880 Aug 19 20:59 opening.avi
-rw-r--r--   1 root     root       12855 Aug 21 21:57 whos.txt
bash-3.00# tar cf dir1.tar dir1
bash-3.00# find ./dir1 -print | pax -w -f dir1.pax
bash-3.00# ls -ldh dir*
drwxr-xr-x  76 root     root        4.0K Aug 20 23:27 dir1
-rw-r--r--   1 root     root        252M Aug 21 21:58 dir1.pax
-rw-r--r--   1 root     root         49M Aug 21 21:57 dir1.tar
drwxr-xr-x   2 root     root         512 Aug 20 23:27 dir2
 
Old 08-22-2007, 05:56 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
I suppose dir1 has many small or zero size files for such a difference to appear. In that case, you certainly can efficiently compress the archive if size is an issue.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 10 02-23-2008 05:40 AM
PAX protection deadlinx Linux - Security 4 06-08-2007 03:51 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
KernelHang : PAX and Highmem connection kingkhan2006 Linux - Security 1 09-04-2006 06:42 PM
Excluding a file when using pax tobycatlin Linux - General 9 04-28-2005 11:13 AM


All times are GMT -5. The time now is 03:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration