From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 1 Nov 2008 14:05:39 -0700 From: Roman Shaposhnik In-reply-to: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-id: <88AA41FF-421E-4E72-AC4E-FE8CED83D599@sun.com> MIME-version: 1.0 Content-type: text/plain; delsp=yes; format=flowed; charset=US-ASCII Content-transfer-encoding: 7BIT References: <4C2C9539-5ABB-4230-BC8A-A1765DFC0E1C@utopian.net> Subject: Re: [9fans] mv on directory Topicbox-Message-UUID: 2c04d0f4-ead4-11e9-9d60-3106f5b1d025 On Nov 1, 2008, at 8:04 AM, Eric Van Hensbergen wrote: > On Sat, Nov 1, 2008 at 9:17 AM, Rudolf Sykora > wrote: >> >>> Again, "What should mv do to a tree that resides on multiple file >>> servers?" >> >> what about: mv dirA dirB == >> mkdir dirB >> dircp dirA dirB >> rm -r dirA >> >> ... if you are able to 'rm -r' (which also may span multiple >> fileservers) than I don't see any trouble with moving the >> directories. >> > > I would imagine that 99% of the time (more?) the behavior people > desire would be what you describe. But what is the behavior? Is it literally the above set of rc commands? Or is there an atomicity expectation as well? After dircp dirA dirB the contents of dirB could be surprising, especially given the later rm -r dirA. It seems that mv(1) was taken as far as one could go in terms of having a non-surprising behavior: mv dir1/file dir2/file is equivalent to cp -x dir1/file dir2/file ; rm dir1/file. Thanks, Roman.