tar+/dev/null weirdness

Les Mikesell lesmikesell at gmail.com
Wed May 4 17:50:51 UTC 2005


On Wed, 2005-05-04 at 12:36, T. Horsnell wrote:

> I'm trying to investigate tar speeds over NFS. I normally test
> tar speeds by 'tar cf /dev/null somefilesystem' but if the filesystem
> is an NFS one, using /dev/null as the output file is resulting in
> impossible tar speeds. If the tar output is directed to a file
> rather than to /dev/null, all is well. Does tar do some sort
> of magic if its tarring NFS stuff to /dev/null? For example:

GNU tar recognizes /dev/null as something magic whether or not
the files are on NFS and it skips reading the actual data.  This
feature is used by the amanda backup program to quickly obtain
estimates of full vs. incremental backup sizes.  If you want
to force the files to be read, try 'tar cf - somedir >/dev/null'
instead.

-- 
  Les Mikesell
   les at futuresource.com





More information about the fedora-list mailing list