bug-coreutils
[Top][All Lists]
Advanced

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

logical paths [was: (no subject)]


From: Eric Blake
Subject: logical paths [was: (no subject)]
Date: Sat, 09 Sep 2006 12:10:51 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Please use a subject line.  It makes it less likely that your message will
be discarded as junk.

According to Kartik K. Agaram on 9/9/2006 6:03 AM:
> 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 many commands, POSIX requires that the utility use the underlying
behavior of many syscalls, and those are required to operate on physical
paths.  However, there is nothing preventing coreutils from adding
additional command-line options that tell tools to interpret $PWD and
behave on relative paths logically.  On the other hand, it is quite easy
to type `pwd`/../z, and get a valid physical path to hand to cp,
regardless of whether $PWD is currently physical or logical, rather than
relying on the semantics of ../z being one way or the other.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFAwOr84KuGfSFAYARAoAdAKC4iDg6v/EIciskvog6+lbhNUmGZgCgsavw
Yzt/BusSg6P5zlykVzjDoAA=
=LYLx
-----END PGP SIGNATURE-----




reply via email to

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