GNU Info

Info Node: (fileutils.info)Trailing slashes

(fileutils.info)Trailing slashes


Prev: Target directory Up: Common options
Enter node , (file) or (file)node

Trailing slashes
================

   Some GNU programs (at least `cp' and `mv') allow you to remove any
trailing slashes from each SOURCE argument before operating on it.  The
`--strip-trailing-slashes' option enables this behavior.

   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', for example, (via the system's rename function) must
interpret a trailing slash as a request to dereference the symbolic link
and so must rename the indirectly referenced _directory_ and not the
symbolic link.  Although it may seem surprising that such behavior be
the default, it is required by POSIX.2 and is consistent with other
parts of that standard.


automatically generated by info2www version 1.2.2.9