
29 Oct
2004
29 Oct
'04
4:43 p.m.
Ketil Malde wrote:
pwd
/home/diatchki
ln -s /usr/local test cd test/.. Now if test was not a link, this does nothing and I should still be in my home directory. However since 'test' is a link, I actually end up in /usr. On Linux, there's no such difference, the example leaves me in my home
diatchki@cse.ogi.edu writes: directory. I believe Solaris has the behaviour you describe.
That's a feature of most current shells, not a feature of the OS: If you strace your shell in question (e.g. bash), you'll see that it calls chdir() only with absolute paths in that scenario, probably using the PWD environment variable as a helper. If you use e.g. ftp, you'll see the behaviour Iavor describes, the "real" OS behaviour. Cheers, S.