Thanks.

Seems clear.  Always use this flag and you get "expected", "old", behavior.

I was going to suggest that there be a description of the symbolic link
dereferencing in the descriptive body of the info page.  But the entire
page is so short that the description of this new argument takes up a
significant fraction of it anyhow. None the less, I've been writing so
here's my stab at it:

SOURCE arguments that are symbolic links to directories are a special case:
when such a SOURCE argument has a trailing slash, the directory
_referenced_ by the symbolic link is renamed; when the SOURCE does not have
a trailing slash, the symbolic link itself is renamed.  <move from
--strip-trailing-slashes doc>Although this behavior may seem surprising, it
is required by POSIX.2 and is consistent with other parts of that
standard.</move>  --strip-trailing-slashes disables this special case --
when this argument is used symbolic links will never be dereferenced, mv
will always rename the symbolic link.

(Feel free to change : and ; to . in the first sentence above.)

It also occurs to me that perhaps mv should impliment a (gnu standard)
--dereference argument to always dereference, and maybe a --no-dereference
to never dereference.  --no-dereference would be instead of
--strip-trailing-slashes.  (The end user dosen't really care how the
system's rename() function works and how mv has to fudge it.)

>[This is a resend (I had a bad route for artic)...]
>
>"Karl O. Pinc" <[EMAIL PROTECTED]> writes:
>...
>| >  Consistent and standard
>| >behavior is better than random better behavior that is all different
>| >everywhere.
>|
>| Ok.  I accept this.  Can't say it makes me happy.  :-P
>|
>| There should be a note in the documentation tho'.
>
>In the latest test release,
>
>  ftp://alpha.gnu.org/gnu/fetish/fileutils-4.0o.tar.gz
>
>there is this:
>
>`--strip-trailing-slashes'
>     Remove any trailing slashes from each SOURCE argument.  This is
>     useful when a SOURCE argument may have a trailing slash and specify
>     a symbolic link to a directory.  This scenario is in fact rather
>     common because some shells can automatically append a trailing
>     slash when performing file name completion on such symbolic links.
>     Without this option, `mv' (via the system's rename function) must
>     interpret the trailing slash as a request to dereference the
>     symbolic link and so must rename the indirectly referenced
>     _directory_ and not the symbolic link.  Although this behavior may
>     seem surprising, it is required by POSIX.2 and is consistent with
>     other parts of that standard.


Karl

May the Legos (TM) always be swept from your path in the night.

Reply via email to