From owner-freebsd-hackers Mon Nov 22 12:53:59 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from orion.ac.hmc.edu (Orion.AC.HMC.Edu [134.173.32.20]) by hub.freebsd.org (Postfix) with ESMTP id 9ABB514BE0 for ; Mon, 22 Nov 1999 12:53:55 -0800 (PST) (envelope-from brdavis@orion.ac.hmc.edu) Received: (from brdavis@localhost) by orion.ac.hmc.edu (8.8.8/8.8.8) id MAA01614; Mon, 22 Nov 1999 12:51:18 -0800 (PST) Date: Mon, 22 Nov 1999 12:51:18 -0800 From: Brooks Davis To: Zhihui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: A file with holes - a bug? Message-ID: <19991122125118.A24587@orion.ac.hmc.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre4i In-Reply-To: ; from zzhang@cs.binghamton.edu on Mon, Nov 22, 1999 at 01:48:38PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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