bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Print estimate Tar size without reading data


From: Tomas M
Subject: [Bug-tar] Print estimate Tar size without reading data
Date: Mon, 22 Jan 2007 21:01:14 +0100
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Hi,
I'd like to suggest a feature for Tar.

The option --totals prints total size of tar archive, but it needs to go through the filesystem and read file data. When user only wish to see the size of TAR archive, (s)he must do something like

tar --totals -c /files/* -f /dev/null

or

tar -c /files/* | wc -c

This is OK with small files, but it's problematic if you want to estimate TAR size of several files bigger than 1GB. It reads the data even if it should only stat().

Just for the record, it may be useful to know the size of TAR archive BEFORE actually reading the data, for example to send correct 'Content-Lenght' header for users browser before the Tar output, so user can see very nice progress bar during download of dynamically-created tar archive.

So I would like to suggest a new argument, --compute-total-size, which would only compute total size of TAR archive WITHOUT READING THE FILE DATA.

I believe coding shouldn't be hard for someone who understands the code now, but I'm far to stupid to make it myself (I tried).


Thank you for your consideration

Tomas M
slax.org






reply via email to

[Prev in Thread] Current Thread [Next in Thread]