On 7/19/05, Paul Eggert <[EMAIL PROTECTED]> wrote: > Hmm, why not simply stat the directories before reading them? That > would give more useful behavior, and it won't require the complexity > of an additional option.
That will require me to understand the "tree walking" code (which so far I have not needed to). According to the notes in du, FTS does a depth first search, in which case it may have already read the directory before calling the process_file callback. However there is also a comment to the effect that process_file is called more than once for a directory, perhaps the first call is before the directory is read. I will have to look into it further. There was a practical reason behind my suggestion of an exclude directory times option. Suppose that you are using "du --time" to do a weekly scan for unused directories (which is why I started on the patch in the first place). Suppose also that you are using the atime option. Then, at the moment, you will always get the current date (which is no help). If the stat and read are transposed, then you will get a date of not more than a week ago (the date of the previous scan). This is not a lot more useful. What you want to know is that none of the files in the directory have been accessed for 12 months (or whatever). _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils