Hacker News new | past | comments | ask | show | jobs | submit login

> presumably because it wants to maintain a clean notion of PWD that doesn't contain a complex series of relative paths.

More probably, it's so that things don't get confusing for the user with symbolic links to directories. If you cd to a symbolic link that leads to a directory, `chdir("..")` goes to the parent of the target, while `cd ..` goes to the parent of the source. In other words, `cd dir/subdir/; cd ..` will always get you back to dir/, but if it used chdir("..") it wouldn't always.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: