9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Eric Van Hensbergen" <ericvh@gmail.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 21:12:02 -0500	[thread overview]
Message-ID: <a4e6962a0811011912n122c667n7ff6e59434f59e30@mail.gmail.com> (raw)
In-Reply-To: <88AA41FF-421E-4E72-AC4E-FE8CED83D599@sun.com>

On Sat, Nov 1, 2008 at 4:05 PM, Roman Shaposhnik <rvs@sun.com> wrote:
> On Nov 1, 2008, at 8:04 AM, Eric Van Hensbergen wrote:
>>
>> 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.
>

Well, I suppose there'd have to be a bit more wrapping around checking
for failure of the copy before the erase -- but otherwise perhaps I'm
being dense and don't see the surprise.  Its clear you won't get the
atomicity, but there's no clear way to obtain that -- and, as I said,
I'm not sure who depends on that when using the mv command.

    -eric



  reply	other threads:[~2008-11-02  2:12 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
2008-11-02  2:12         ` Eric Van Hensbergen [this message]
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=a4e6962a0811011912n122c667n7ff6e59434f59e30@mail.gmail.com \
    --to=ericvh@gmail.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).