System.FilePath propsal

Sven Panne Sven.Panne at aedion.de
Fri Oct 29 12:43:54 EDT 2004


Ketil Malde wrote:
> diatchki at cse.ogi.edu writes:
>>>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
> 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.


More information about the Libraries mailing list