Mailinglist Archive: opensuse (1445 mails)

< Previous Next >
Re: [opensuse] faster way to get total dir size besides du?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2012-03-06 04:07, David Haller wrote:

- AFAIK no filesystem I know of stores the sizes of a directory's
contents somewhere in the directory's metadata

FAT does, kind of. The directory is a record that contains file names,
attributes, sizes, and starting record. You just have to load the directory
record and sum the sizes of all files: one single read one disc record
operation (I don't remember how many files per record). If the directory is
big, then there have to be more reads. The operation is very fast. If there
are subdirectories, then it is slower (recursive calls).

- --
Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 "Celadon" at Telcontar)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAk9Vhq0ACgkQIvFNjefEBxqJNgCgq4scJxVr9DgHHBe2hbLlpnuE
ew8AnipYINIfIeFIHF3zigjxfcY5oAz3
=QWO4
-----END PGP SIGNATURE-----
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups