Tim Kientzle <t...@kientzle.com> wrote:

> I'm curious.  If someone types the following command:
>
>    tar cf /dev/null some files
>
> What do you think they expect to happen?

Of course that all files are read. POSIX does not allow different behavior just 
because the output is connected to a different sink.

Maybe this is why n-1 tar implenentations implement a uniform behavior.
Star implements a special documented option for the case that a user is 
interested in getting the size of the archive to be created quickly.
If one user (amanda) expects side-effects, I would see this as a bug.

tar cf /dev/null some files 

Is used by many people to do one of the following:

-       Do speed tests for the underlying filesystem

-       Give the OS the opportunity to cache data and meta data

-       Make sure that all data and meta data in a filesystem is read
        in order to trigger disks to do auto-reallocation on blocks
        that are going to become bad.

-       Make sure that all data and meta data in a filesystem is readable

Gtar does not allow this to be done easily and keep in mind that many OS 
implementations have a significant performance loss when using pipes.

Jörg

-- 
 EMail:jo...@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       j...@cs.tu-berlin.de                (uni)  
       joerg.schill...@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily

Reply via email to