From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0a304f2dd88c5bdb8eb1ce403c53e037@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] union directories From: "Russ Cox" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 3 Mar 2003 13:05:41 -0500 Topicbox-Message-UUID: 7706d2ae-eacb-11e9-9e20-41e7f4b1d025 > Actually I have had more Unix-oriented folks ask me if in a union ls > there could be an option, per-file, to display the binding for that file > when there is more than one. Per-file options are a bad idea not even worth talking about. > I got real complaints from people about seeing multiple files with the > same name on an ls. Ls tells the truth! I see no value in causing it to lie. And then once ls lies, why doesn't ls *? Why doesn't acme? Ls does one thing. It does it well. It's consistent with the rest of the system. If you want sort -u, you know where to find it. There might be good arguments that directory reads should reflect the information in the mount table, perhaps eliding duplicates and perhaps showing you the real stat info for bound-over files (what you'd get with stat(2)). Then again there are also good arguments for the way things are now. Read the ksh example in the lexnames paper. The last thing we need is user-space programs that ``patch'' kernel behaviors. Arguing that the kernel needs fixing might be reasonable. Changing ls to hack around perceived kernel deficiencies is the path to madness (or to Linux, take your pick). Russ