Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 1999 12:51:18 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Zhihui Zhang <zzhang@cs.binghamton.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: A file with holes - a bug?
Message-ID:  <19991122125118.A24587@orion.ac.hmc.edu>
In-Reply-To: <Pine.GSO.3.96.991122133521.4039A-100000@sol.cs.binghamton.edu>; from zzhang@cs.binghamton.edu on Mon, Nov 22, 1999 at 01:48:38PM -0500
References:  <Pine.GSO.3.96.991122133521.4039A-100000@sol.cs.binghamton.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 22, 1999 at 01:48:38PM -0500, Zhihui Zhang wrote:
> 
> By the way, I also find out if you copy a file with holes into another
> file, the holes in the first file will be replaced with 0s in the second
> file, taking more disk space (check with du). Is there a better solution
> for this? 

Unfortunately, not one that preserves the holes exactly the way they
existed in the original file.  See
http://reality.sgi.com/zwicky_neu/testdump.doc.html for a good discussion
of the problems of copying files with holes via the userland interface
to the file system.  If all you care about is the space, you could write
a version of cp that compressed all zeroed blocks into holes.

-- Brooks

-- 
"Those who desire to give up freedom in order to gain security, will not
have, nor do they deserve, either one"
                                           --Thomas Jefferson 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991122125118.A24587>