From: John-John Tedro Date: 2011-08-22T22:16:21+09:00 Subject: Re: change into symlink directory - how? --0050450140927cb5a004ab17e2ca Content-Type: text/plain; charset=ISO-8859-1 Try the following: Open a bash shell: #> mkdir foo #> ln -s foo bar #> cd bar Now the bash shell hopefully displays something like: "~/bar" Then check the "real" pwd for the current bash shell. #> stat /proc/$$/cwd File: `/proc//cwd' -> `/home//foo' ... snip ... This excercise shows that there is no such notion as a symlinked working directory, it's just bash being clever. I.e. the system calls always resolve the soft links (or ELOOP), but bash manages the state of the soft links. If you look into the documentation of ls and cd you see the options -L/-P (as mentioned earlier). If you want another excercise (go back to the original directory), try: #> mkdir temp #> ln -sf $PWD/foo temp/bar #> cd temp/bar #> ls .. You might be surprised that the directory being listed is actually the initial $PWD, not $PWD/temp. This is because ls usually is not a bash built-in, but a real command. The result: if you want symlink magic, you have to do it like bash; the hard way : ). Hope this clears things up! -- John-John Tedro --0050450140927cb5a004ab17e2ca--