[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wrong size with ls

bob@proulx.com (Bob Proulx) writes:

> Disk blocks used and size of files are related only in that the latter
> will always be less than the former on an uncompressed filesystem.

Not quite.  Files on (most) Unix filesystems can contain "holes".  If
there's a large block of zeros in a file, and the file is created in
the right way (like by seeking to a position and then writing) the
blocks containing zeros don't actually take up space on disk.

If you copy or tar files like that, you may need to specify an option
to allow sparse files.

Alan Shutko <ats@acm.org> - In a variety of flavors!
Language is a human virus from outer space.

Reply to: