zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: zsh-workers@sunsite.dk, martin f krafft <madduck@debian.org>,
	479764@bugs.debian.org
Subject: Re: Bug#479764: shell builtin mv fails to move files across devices
Date: Tue, 6 May 2008 19:52:48 +0100	[thread overview]
Message-ID: <20080506185248.GA5230@sc.homeunix.net> (raw)
In-Reply-To: <20080506150303.GB31177@scru.org>

On Tue, May 06, 2008 at 04:03:03PM +0100, Clint Adams wrote:
> On Tue, May 06, 2008 at 03:42:08PM +0100, martin f krafft wrote:
> > lapse:~/debian|master|debian.ch% echo $ZSH_VERSION
> > 4.3.6-dev-0+0428
> > lapse:~/debian|master|debian.ch% zmodload zsh/files
> > lapse:~/debian|master|debian.ch% which mv
> > mv: shell built-in command
> > lapse:~/debian|master|debian.ch% mv /tmp/debian.ch_T-Shirt_20080422-poll.png .
> > mv: /tmp/debian.ch_T-Shirt_20080422-poll.png: invalid cross-device link
> 
> Anyone up for changing this in a future version?
> 
>     Note  that  this  mv  will not move files across devices.  Historical
>     versions of mv, when actual renaming is impossible, fall back on copying
>     and removing files; if this behaviour is desired, use cp and rm manually.
>     This  may  change  in  a future version.

Note that POSIX requires mv to be able to move files (and now
directories) accross file systems. Note that it's quite a
complex task as it involves recreating the files as they were
(permissions, ownership, ACLs, sparse files), handle conflicts,
handle hard links correctly, and handle the error cases
properly. It's not as simple as cp+rm, it would rather be pax
-rw && rm -rf 

-- 
Stéphane


      parent reply	other threads:[~2008-05-06 18:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080506144208.GA15225@lapse.madduck.net>
2008-05-06 15:03 ` Clint Adams
2008-05-06 15:45   ` Bart Schaefer
2008-05-06 16:55     ` martin f krafft
2008-05-06 20:52       ` Peter Stephenson
2008-05-06 20:55       ` Phil Pennock
2008-05-07 21:30         ` Vincent Lefevre
2008-05-07 21:47           ` Phil Pennock
2008-05-07 22:50             ` Vincent Lefevre
2008-05-07 23:03               ` martin f krafft
2008-05-08  3:23                 ` Vincent Lefevre
2008-05-08  9:34                   ` Stephane Chazelas
2008-05-07 22:06           ` Mikael Magnusson
2008-05-07 22:57             ` Vincent Lefevre
2008-05-06 18:52   ` Stephane Chazelas [this message]

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=20080506185248.GA5230@sc.homeunix.net \
    --to=stephane_chazelas@yahoo.fr \
    --cc=479764@bugs.debian.org \
    --cc=madduck@debian.org \
    --cc=zsh-workers@sunsite.dk \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).