From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] ls, rc question -- proposed change to rc/glob.c From: rog@vitanuova.com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 23 Mar 2004 03:15:24 +0000 Topicbox-Message-UUID: 3d7e9434-eacd-11e9-9e20-41e7f4b1d025 > > come to think of it, if i expect {rm -r a} to empty (and delete) `a' > > might i not expect {rm a/*} and especially {rm -r a/*} > > to remove all removable names from `a'? > > seems right. There's a lot of subtleties to the union thing. I think that > Plan 9's decision (present it to the users in its entirety) is the right > one. it's a trade-off. some things work better, some things work worse. having said that, the above is the only occasion i've seen that makes use of the duplicate names in any kind of a sensible manner (but remove (and rename) is a strange operation in a union directory anyway - remove("x") does not necessarily mean that "x" goes away). i excluded write operations originally, and marked the rm behaviour as "questionable" because i believe it can be argued both ways. union directories themselves cannot be removed, so one's on fairly shaky ground trying to rm -r them... most tools read a directory in order to enumerate its accessible items. in that context, seeing unique names only is more correct.