Eric at Lucii.org on 29 Dec 2011 16:43:26 -0800 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] traversing symbolically linked directories with bash |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks, that was a good post! I'm still cogitating on it but I have the feeling I'm not going to get what I want... at least not in bash. On 12/29/2011 05:18 PM, Jeff Bailey wrote: > 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: > > 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 ___________________________________________________________________________ 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 - -- # 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/ iEYEARECAAYFAk79CRsACgkQ2sGpvXQrZ/6LcQCgplD8uZ1nzv+uTWfQLL6JV5Bs ihYAn2/VtRj3wG67qFNBLNKmQIkEnDCd =O9OX -----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