From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9ac634e947eb39000123f84271f9c74e@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] du From: "rob pike, esq." MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 21 Mar 2002 08:37:26 -0500 Topicbox-Message-UUID: 6ba08c8a-eaca-11e9-9e20-41e7f4b1d025 > Plan 9 du(1) is inconsistent with BSD's: du -s walks down one > directory in Plan 9 before the summary. I believe that I can achieve > that effect, should I want it, by entering du -s *, whereas I can't > achieve the same effect as NetBSD's du -s / using Plan 9's semantics. > > Do I need a new du of my own or would the community accept a modified > du(1) with BSD semantics? Is there a reason for the Plan 9 semantics > that I am unaware of? This seems reasonable. I'm not sure why du works this way; it could be I was trying to reproduce the behavior of the old `research Unix' version, or I might have thought it was a good idea at the time, or I might just have screwed up. The code goes out of its way to behave like this. In any case, it's trivial to change. Just eliminate the variable 'top' altogether from the function du() in /sys/src/cmd/du.c. I've made the change on our system. -rob