From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <38f6304f0448ab7a2c49acc0d6293169@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] bind -c From: "Russ Cox" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Fri, 7 Mar 2003 16:07:18 -0500 Topicbox-Message-UUID: 7d250b56-eacb-11e9-9e20-41e7f4b1d025 > Why shouldn't this work? > term% mkdir replica; cd replica > term% bind -c . . > term% bind -a /sys/src/cmd/replica . > term% cp mkfile . #obtain a local copy > cp: mkfile and mkfile are the same file Because the first thing cp does is basically ls -lq mkfile ./mkfile and discovers that the source and destination are the same. Binding with -c only changes where _new_ files are created. When you create() an existing file that directory entry is used. In this case it's probably significantly easier just to mkdir replica cp /sys/src/cmd/replica/* replica and not worry about union directories. What I usually do for things like this is: cd /sys/src/cmd/replica bind -bc $home/replica . and then cp mkfile $home/replica etc. to make copies of the files I want to change. Russ