bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mv trailing slash warning


From: Dr. David Alan Gilbert
Subject: Re: mv trailing slash warning
Date: Mon, 26 Sep 2005 18:17:41 +0100
User-agent: Mutt/1.4.1i

* Jim Meyering (address@hidden) wrote:

> > $ mkdir a b
> > $ ln -s $PWD/a sym
> > $ mv sym/ b
> > mv: cannot move `sym/' to `b/sym': Not a directory
> >
> > The 'mv' is straight out of recent cvs. I'm in an ext3 filesystem
> > on Linux (Ubuntu).
> >
> > Am I misunderstanding something about that warning or is this
> > a bug?
> 
> It depends on the semantics of the rename syscall.
> And those semantics vary from system to system.
> On older linux systems (probably 2.4.x, certainly 2.2.20, which
> I've just tested) your mv command renames `a' to b/sym.

OK, as far as I can tell on the 2.6.x machines I've tried it on it
doesn't.

> Losing systems probably deserve a configure-time test and a rename
> wrapper to correct for the unexpected behavior.

Nod.  Perhaps the warning needs a warning that it can't be relied
on?

Dave
--
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]