If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):
From: "Fabio Giannotti" <fabiog@venmar.com>
References: <942dhp$cd9$1@nnrp1.deja.com> <20010116170637.L3112@jpradley.jpr.com>
Subject: Re: tar much larger than contents
Date: Tue, 16 Jan 2001 16:30:42 -0600
Jean-Pierre Radley <jpr@jpr.com> wrote in message
news:20010116170637.L3112@jpradley.jpr.com...
> Nick Cole propounded (on Tue, Jan 16, 2001 at 09:13:38PM +0000):
> |
> | l *tar
> | -rw------- 1 manager other 361984 Dec 20 03:51 bu1.tar
> | -rw------- 1 manager other 3847680 Dec 20 03:51 bu2.tar
> |
> | tar tvf bu1.tar
> | tar: blocksize = 20
> | rw-rw-r--999/1 663 Dec 20 03:39
> | 2000 /usr/cheshire/credit/pbmerc.dat
> |
> | tar tvf bu2.tar
> | tar: blocksize = 20
> | rw-rw-rw-999/1 487696 Dec 20 03:39 2000
/usr/cheshire/credit/pbadmin/DB/pbadmain.dat
> | rw-rw-rw-999/1 169984 Dec 20 03:39 2000
/usr/cheshire/credit/pbadmin/DB/pbadmain.idx
>
> | Can anyone speculate why these tar archives are much larger than their
> | component files? I know blocking makes archives slightly larger, but
> | this is ridiculous.
>
> It isn't ridiculous, it's perfectly normal. Once upon a time, you did
> need that many bytes in each tar-file to hold its specified contents.
> Using a 'tar cf 'file.tar ...' command does NOT first erase or null out
> file.tar; it never shrinks. Try 'tar cvf bu1.tar /etc/profile', and
> bu1.tar will still be 361984 bytes.
>
Well I'll be darned. You learn something new everyday.
Do you know the original reasoning behind this behavior? It seems to me
that it *should* erase the file first...
Fabio
Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)
| Views for this page | ||||
|---|---|---|---|---|
| Today | This Week | This Month | This Year | Overall |
| 3 | 6 | 9 | 9 | 1,585 |
/Bofcusm/963.html copyright 1997-2004 (various authors) All Rights Reserved
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Click here to add your comments