I have used Linux the past five years, and Various flavors of Unix for more than 20. I now see a new behavior for symbolically linked directories: Suppose in your home directory you create the link: % ln -s /usr/local/share/math math Then you issue the commands: % cd math % pwd /usr/local/share/math % % cd .. % pwd /home/sinan In all other Linux/Unix distributions, the last line above will be /usr/local/share not /home/sinan. Does anybody know if this is a new behavior we should expect in Linux from now on, or os this a Suse specific quirk? Perhaps there is a command that would switch to the old behavior. Any idea what it might be? -sinan
On Monday 14 June 2004 01.54, sinan kaptanoglu wrote:
I have used Linux the past five years, and Various flavors of Unix for more than 20. I now see a new behavior for symbolically linked directories:
Suppose in your home directory you create the link: % ln -s /usr/local/share/math math
From the % sign I'm guessing you're using C shell, is that right? In /etc/csh.cshrc (or your local .cshrc) you can change the value of symlinks, by default it is "set symlinks=ignore", you may want to set it to "chase". See 'man csh' for the details In bash, you can uncomment the line "set -P" in /etc/bash.bashrc (or, again, put that line in your user's $HOME/.bashrc to make a local change for just that user). 'man bash' has the details for that Since 'cd' is a shell builtin, this is not a linux thing, it is a shell thing
On Sun, 13 Jun 2004 16:54:46 -0700
sinan kaptanoglu
I have used Linux the past five years, and Various flavors of Unix for more than 20. I now see a new behavior for symbolically linked directories:
Suppose in your home directory you create the link: % ln -s /usr/local/share/math math Then you issue the commands: % cd math % pwd /usr/local/share/math % % cd .. % pwd /home/sinan
In all other Linux/Unix distributions, the last line above will be /usr/local/share not /home/sinan.
Does anybody know if this is a new behavior we should expect in Linux from now on, or os this a Suse specific quirk? Perhaps there is a command that would switch to the old behavior. Any idea what it might be? As Anders said, the 'cd' command is a shell builtin. however, your comment is untrue. Just to make sure I tested on my SuSE 9.0 desktop and the BLU's Red Hat 7.1 server. Both have the same behavior as you indicated above, and if I recall, the Korn shell on both HP-UX and Tru64 Unix also behave that way.
--
Jerry Feldman
participants (3)
-
Anders Johansson
-
Jerry Feldman
-
sinan kaptanoglu