Jeff Bailey on 29 Dec 2011 14:18:42 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] traversing symbolically linked directories with bash |
according to this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642392 it seems like Debian prefers it that way.... On 12/29/11, Eric at Lucii.org wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've run across a behavior in bash that I thought was impossible. I'm running bash on an Ubuntu 10.04 box. Bash is: GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu) I have a home directory and I create a soft link to another directory like this example: /home/eric/appdata -> /opt/myapplication/users/eric/data Now I start a shell in my home directory, cd to appdata, and then try to see where I am: shell builtin "pwd" returns: /home/eric/appdata executable /bin/pwd returns: /home/eric/appdata ls -l .. shows contents of /home/eric cd .. takes me back to /home/eric SO FAR, SO GOOD. Next, I log on to a Debian system. Linux version 2.6.26-2-686 (Debian 2.6.26-27) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed Sep 21 04:35:47 UTC 2011 I do the same thing... shell builtin "pwd" returns: /home/eric/appdata executable /bin/pwd returns: /opt/myapplication/users/eric/data <- OOPS! Here's my problem: ls -l .. shows contents of /opt/myapplication/users/eric, NOT /home/eric cd .. takes me back to /opt/myapplication/users/eric, NOT /home/eric Is there some bash setting I'm unaware of that causes this behavior? It makes no sense to me! I don't even know how to do a Google search for it. I thought it might be related to some aspect of posix mode but the behavior remains even after exec bash --posix or set -o posix. Eric - -- # Eric Lucas # # "Oh, I have slipped the surly bond of earth # And danced the skies on laughter-silvered wings... # -- John Gillespie Magee Jr -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk785RIACgkQ2sGpvXQrZ/5mrACg/5nwMjWgEZGzULH575vcQpb9 GSwAn26k9N6ZPvrMx1bRK47EKneB6oKx =DyEX -----END PGP SIGNATURE----- ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug