Side note -- later, when testing the new feature on multiple operating systems, it broke on NetBSD because one of the hard-coded parameters needed to dynamically adjust to the right value for each type of system.
The NetBSD manuals recommend "fts_*" over "nftw", with this to say about the "fts" functions:
"The fts utility was expected to be included in the IEEE Std 1003.1-1988 ("POSIX.1") revision. But twenty years later, it still was not included in the IEEE Std 1003.1-2008 ("POSIX.1") revision."
So I probably could have just done what "du" does, after all. But I learned a small piece of history, and the new code is still much shorter and simpler than it would have otherwise been.

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.