9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Roman Shaposhnik <rvs@sun.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] mv on directory
Date: Sat,  1 Nov 2008 14:05:39 -0700	[thread overview]
Message-ID: <88AA41FF-421E-4E72-AC4E-FE8CED83D599@sun.com> (raw)
In-Reply-To: <a4e6962a0811010804x52dc77cdhf9e76f4aa18cd3e9@mail.gmail.com>

On Nov 1, 2008, at 8:04 AM, Eric Van Hensbergen wrote:
> On Sat, Nov 1, 2008 at 9:17 AM, Rudolf Sykora
> <rudolf.sykora@gmail.com> 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.



  reply	other threads:[~2008-11-01 21:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1225540801.26550.9fans@9fans.net>
2008-11-01 13:48 ` Josh Wood
2008-11-01 14:17   ` Rudolf Sykora
2008-11-01 15:04     ` Eric Van Hensbergen
2008-11-01 21:05       ` Roman Shaposhnik [this message]
2008-11-02  2:12         ` Eric Van Hensbergen
2008-11-03  3:02           ` Roman Shaposhnik
2008-11-01 16:30 Josh Wood
2008-11-01 21:25 ` Roman Shaposhnik
  -- strict thread matches above, loose matches on Subject: below --
2008-10-31 20:15 Rudolf Sykora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88AA41FF-421E-4E72-AC4E-FE8CED83D599@sun.com \
    --to=rvs@sun.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).