Re: mv trailing slash warning

2005-09-28 Thread Eric Blake
> > On a related note, why don't rm and rmdir have a --strip-trailing-slashes > > option? > > Because as far as I know, there is no need. > Do you know of a system where `rmdir symlink/' > removes only the referent of the symlink? By a strict reading of http://www.opengroup.org/onlinepubs/0096953

Re: mv trailing slash warning

2005-09-28 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > I think the wrapper-induced overhead of an extra lstat imposed on losing > systems, but only for operands with a trailing slash, is bearable. > This is one of those `would be nice' things. > But I'm not in any big hurry, since Linux 2.6.x does it right.

Re: mv trailing slash warning

2005-09-28 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > Do you know of a system where `rmdir symlink/' > removes only the referent of the symlink? Lots of systems do that, I expect. Solaris 10 does, for example. This is either with Solaris rmdir or coreutils 5.3.0 rmdir. I wouldn't be surprised if core comm

Re: mv trailing slash warning

2005-09-28 Thread Eric Blake
> > On a related note, why don't rm and rmdir have a --strip-trailing-slashes > > option? > > Because as far as I know, there is no need. > Do you know of a system where `rmdir symlink/' > removes only the referent of the symlink? Yes, cygwin (but again, that goes back to the rmdir(2) bug in cygw

Re: mv trailing slash warning

2005-09-28 Thread Jim Meyering
[EMAIL PROTECTED] (Eric Blake) wrote: >> As you can imagine, I find the POSIX-required behavior to be senseless. >> The above behavior of non-POSIX rename, seen on Linux-2.6.x, is fine. >> Now that Linux/glibc provides a sane rename function, I'm tempted >> to make mv work in the above manner on al

Re: mv trailing slash warning

2005-09-28 Thread Paul Eggert
[EMAIL PROTECTED] (Eric Blake) writes: > Why don't rm and rmdir have a --strip-trailing-slashes option? I'd guess because that option is an ugly hack and we'd rather that the problem went away > we should bring this up with the austin group. Perhaps, but let's figure out what we want first.

Re: mv trailing slash warning

2005-09-28 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Jim Meyering <[EMAIL PROTECTED]> writes: > >> As you can imagine, I find the POSIX-required behavior to be senseless. > > Two things. > > First, I recall that you preferred the non-POSIX behavior because of > file name completion issues. But because we agi

Re: mv trailing slash warning

2005-09-28 Thread Jim Meyering
[EMAIL PROTECTED] (Eric Blake) wrote: ... > On a related note, why don't rm and rmdir have a --strip-trailing-slashes > option? Because as far as I know, there is no need. Do you know of a system where `rmdir symlink/' removes only the referent of the symlink? ... > Oops - cygwin has a bug in thi

Re: mv trailing slash warning

2005-09-28 Thread Eric Blake
[cc-ing bash-completion maintainer] > First, I recall that you preferred the non-POSIX behavior because of > file name completion issues. But because we agitated about this a > while ago, Bash now does a better job with file name completion. For > example, given this: > > mkdir dir >

Re: mv trailing slash warning

2005-09-28 Thread Paul Eggert
Jim Meyering <[EMAIL PROTECTED]> writes: > As you can imagine, I find the POSIX-required behavior to be senseless. Two things. First, I recall that you preferred the non-POSIX behavior because of file name completion issues. But because we agitated about this a while ago, Bash now does a better

Re: mv trailing slash warning

2005-09-28 Thread Eric Blake
> > As you can imagine, I find the POSIX-required behavior to be senseless. > The above behavior of non-POSIX rename, seen on Linux-2.6.x, is fine. > Now that Linux/glibc provides a sane rename function, I'm tempted > to make mv work in the above manner on all systems rather than allowing > the cr

Re: mv trailing slash warning

2005-09-28 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > According to Dr. David Alan Gilbert on 9/26/2005 11:17 AM: >> $ mkdir a b $ ln -s $PWD/a sym $ mv sym/ b mv: cannot move `sym/' to `b/sym': Not a directory >> >> Nod. Perhaps the warning needs a warning that it can't be relied >> on? > > No,

Re: mv trailing slash warning

2005-09-26 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Dr. David Alan Gilbert on 9/26/2005 11:17 AM: > >>>$ mkdir a b >>>$ ln -s $PWD/a sym >>>$ mv sym/ b >>>mv: cannot move `sym/' to `b/sym': Not a directory > > Nod. Perhaps the warning needs a warning that it can't be relied > on? No, PO

Re: mv trailing slash warning

2005-09-26 Thread Dr. David Alan Gilbert
* Jim Meyering ([EMAIL PROTECTED]) 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 tha

Re: mv trailing slash warning

2005-09-25 Thread Jim Meyering
"Dr. David Alan Gilbert" <[EMAIL PROTECTED]> wrote: > In the info pages for 'mv' is the following statement: > --- > _Warning_: If you try to move a symlink that points to a directory, > and you specify the symlink with a t

mv trailing slash warning

2005-09-25 Thread Dr. David Alan Gilbert
Hi, In the info pages for 'mv' is the following statement: --- _Warning_: If you try to move a symlink that points to a directory, and you specify the symlink with a trailing slash, then `mv' doesn't move the symlink but i