bug-tar
[Top][All Lists]
Advanced

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

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


From: Doug McLaren
Subject: Re: [Bug-tar] Print estimate Tar size without reading data
Date: Mon, 22 Jan 2007 14:22:32 -0600
User-agent: Mutt/1.4.2.1i

On Mon, Jan 22, 2007 at 09:01:14PM +0100, Tomas M wrote:

| The option --totals prints total size of tar archive, but it needs to go 
| through the filesystem and read file data.

Try this --

   tar --totals --create --file=/dev/null /usr

If the file option is /dev/null, tar will not actually read the file,
just stat it.

% tar --totals --create --file=/dev/null /directory/structure
tar: Removing leading `/' from member names
Total bytes written: 65768540160 (62GiB, 100GiB/s)

... took less than one second.

(Side note: if you do need tar to read the files anyways, but want to
write the results to /dev/null, write to /dev/zero instead -- it works
like /dev/null, but isn't treated specially by tar like /dev/null is.)

-- 
Doug McLaren, address@hidden
Anybody with money to burn will easily find someone to tend the fire.




reply via email to

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