OT: about compressed tarball
fedora at westexe.demon.co.uk
Sat Jun 24 19:25:45 UTC 2006
Stephen Liu wrote:
> I create a tarred file then compressed with bzip with following command
> # tar -jcpf AAA.bz2 /home/path/to/dirA
> dirA is about 2G in size.
> After working several days on dirA I want to create a new compressed
> tarred file. Instead of repeating the above command, is there a way
> starting from the old file AAA.bz2 making use of the options -u, -N,
> -G, etc. to reduce the compressing time? I looked around on man tar and
> Internet and could not sort out their combination on the command line.
You wouldn't be able to do this with command lines. bzip2 compresses
900K  blocks at a time: it might be possible, if a 900K block hasn't
changed, to "carry it forward" from the earlier .tar.bz2 to the next,
but you'd need to write a program that got pretty deep into the .tar and
.bz2 format. 
If you really want faster compression, possibly at the expense of
file-size, then gzip might be a much better answer for you. It doesn't
compress as well, but it can compress a lot faster. (Quite how much
faster depends on your processor architecture).
Hope this helps,
 By default: see man bzip2 for details.
 Someone's going to quibble if I don't quote the bzip2 man page
bzip2 compresses files in blocks, usually 900kbytes long. Each block
is handled independently. If a media or transmission error causes a
multi-block .bz2 file to become damaged, it may be possible to recover
data from the undamaged blocks in the file.
E-mail address: james | Whenever [Richard I] returned to England he always
@westexe.demon.co.uk | set out again immediately for the Mediterranean and
| was therefore known as Richard Gare de Lyon.
| -- '1066 and All That'
More information about the users