From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,bdcf40c34116edf7 X-Google-Attributes: gidfee84,public From: Phil Farrell Subject: Re: Strange file sizes Date: 1996/11/27 Message-ID: <329C770E.6BD3@pangea.stanford.edu>#1/1 X-Deja-AN: 201067832 references: <27NOV199616103307@vsts03.ts.infn.it> to: gomezel@vsts03.ts.infn.it content-type: text/plain; charset=us-ascii organization: Stanford University School of Earth Sciences mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 2.02 (Macintosh; I; 68K) 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