Getting file sizes

Ben Scott dragonhawk at gmail.com
Mon Oct 22 10:17:01 EDT 2007


On 10/22/07, Shawn K. O'Shea <shawn at eth0.net> wrote:
> Since I know Kent has a Mac and this might be on his laptop, I'd like
> to add that this should really be:
> du -ck *.txt | tail -1

  Since we're on the subject, it should also be noted that "du" means
*disk usage*.  That means du is supposed to be aware of things like
allocation overhead (a 3 byte might use 4096 bytes on disk, or
whatever) and sparse files (files with "holes" in the middle, thus
using *less* space on disk than the file size).

  The GNU variant, at least, has an option to report actual file sizes
instead of disk usage.

  Which one you want depends on what you're looking for.

-- Ben


More information about the gnhlug-discuss mailing list