du: cache directory size

2008-07-03 Thread Mildred
Hi, I noticed that du takes a long time to scan directories and measure disk usage. I was thinking that perhaps caching the size of directories could bu useful. Perhaps, after du computes the size of a directory, it could write its size in its extended attributes (if the filesystem support it).

Re: du: cache directory size

2008-07-03 Thread Andreas Schwab
Mildred [EMAIL PROTECTED] writes: I was thinking that perhaps caching the size of directories could bu useful. Perhaps, after du computes the size of a directory, it could write its size in its extended attributes (if the filesystem support it). Next time, du would only compare the directory

Re: du: cache directory size

2008-07-03 Thread Philip Rowlands
On Wed, 2 Jul 2008, Mildred wrote: I was thinking that perhaps caching the size of directories could bu useful. Perhaps, after du computes the size of a directory, it could write its size in its extended attributes (if the filesystem support it). Next time, du would only compare the directory

Re: du: cache directory size

2008-07-03 Thread Pádraig Brady
Mildred wrote: Hi, I noticed that du takes a long time to scan directories and measure disk usage. I was thinking that perhaps caching the size of directories could bu useful. Perhaps, after du computes the size of a directory, it could write its size in its extended attributes (if the

Re: du: cache directory size

2008-07-03 Thread Mildred
Le Thu 03/07/2008 à 14:29 Philip Rowlands à écrit: Unfortunately neither the atime nor mtime of a directory would necessarily show a change to the disk usage of the enclosed files. Consider a logfile, for example; the filesize grows continuously, but makes no change to the directory.