Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Phil Farrell <farrell@pangea.stanford.edu>
To: gomezel@vsts03.ts.infn.it
Subject: Re: Strange file sizes
Date: 1996/11/27	[thread overview]
Message-ID: <329C770E.6BD3@pangea.stanford.edu> (raw)
In-Reply-To: 27NOV199616103307@vsts03.ts.infn.it


Crash dump files are "sparse" files.  That is, they have many
blocks in them that are all zeroes, because not every page in
memory was in use.  UNIX file systems (at least those derived 
from BSD, in my experience) can store sparse files so that no
actual disk space is used for those blocks that are all zeroes.
Instead, some flag in the inode indicates that x number of zeroed
blocks belong at this point, and the kernel generates them as
needed when the file is read.

Be careful if you try to copy or move such a sparse file.  The
ordinary "cp" command will not maintain the "sparseness" in the
copy; instead, it will actually write the zeroed blocks to disk,
thus causing the sparse file to balloon in size.  The "dd" command
has an option to correctly copy sparse files while maintaining
their "sparseness".

-- 
Phil Farrell, Computer Systems Manager
Stanford University School of Earth Sciences
farrell@pangea.stanford.edu



  reply	other threads:[~1996-11-27  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-27  5:00 Strange file sizes gomezel
1996-11-27  5:00 ` Phil Farrell [this message]
1996-11-27  5:00 ` Roland Kruse
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox