Re: Strange problem, symlinks and parent dirs
Re: Fabio Tranchitella in <[🔎] 1101981923.766.10.camel@localhost>
> $ ln -s dir1/dir2 dir2
> $ cd dir2
> $ pwd
> $ mv file ..
> The file is moved into /home/kobold/dir1 instead of /home/kobold
> Is this right? IMHO it's confusing for the user. If pwd returns
> "/home/kobold/dir2", .. should be resolved as "/home/kobold".
Sure. ".." is resolved by the kernel which doesn't care about the "name"
of your pwd. It just moves the file to the physical .. directory, i.e.
doesn't go the symlinks back.
That's why I have the following in by .bashrc:
| alias pwd='/bin/pwd;builtin pwd'
tcsh(1) has a "symlinks" option which tries to fix this, but that
doesn't work in all cases.
firstname.lastname@example.org | http://www.df7cb.de/