Hi,

I suspect this may have come up on this list before, but a search didn't reveal it*.

Does POSIX require that coreutils commands use only physical path rather than pwd to resolve relative paths? When pwd contains symlinks and we try to operate upon relative paths that take us outside the symlink, the effect is often jarring and non-intuitive.

For example:
   $ mkdir base_dir
   $ cd base_dir
   $ mkdir -p x/y
   $ touch z
   $ ln -s x/y f
   $ cd f
   $ cp ../z .
   cp: cannot stat `../z': No such file or directory
   $ ls ..
   y

Related discussion on bug-bash:
  http://thread.gmane.org/gmane.comp.shells.bash.bugs/9273

Thanks,
Kartik

* - The closest I got was this thread:
  http://lists.gnu.org/archive/html/bug-coreutils/2005-04/msg00073.html


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to