> Under Linux 7.0 with bash 2.04.11:
1. You should report this to [EMAIL PROTECTED] and not
[EMAIL PROTECTED] Wrong list. But an honest mistake. And of
course we have the best support over here. :-)
2. What you are seeing is considered a feature by many. As an old
timer I don't like it since it causes confusion. But 99% of
everyone I talk with about this prefers the new behavior which
creates a facade around symlinks. We are out voted. This was
originally introduced in ksh, the Korn shell, and bash has followed
suit ksh in this matter.
info bash
`cd'
cd [-LP] [DIRECTORY]
Change the current working directory to DIRECTORY. If DIRECTORY
is not given, the value of the `HOME' shell variable is used. If
the shell variable `CDPATH' exists, it is used as a search path.
If DIRECTORY begins with a slash, `CDPATH' is not used. The `-P'
option means to not follow symbolic links; symbolic links are
followed by default or with the `-L' option. If DIRECTORY is `-',
it is equivalent to `$OLDPWD'. The return status is zero if the
directory is successfully changed, non-zero otherwise.
`pwd'
pwd [-LP]
Print the current working directory. If the `-P' option is
supplied, the path printed will not contain symbolic links. If
the `-L' option is supplied, the path printed may contain symbolic
links. The return status is zero unless an error is encountered
while determining the name of the current directory or an invalid
option is supplied.
* The Bash `cd' and `pwd' builtins (*note Bourne Shell Builtins::.)
each take `-L' and `-P' builtins to switch between logical and
physical modes.
`set'
set [--abefhkmnptuvxBCHP] [-o OPTION] [ARGUMENT ...]
`-o OPTION-NAME'
`physical'
Same as `-P'.
`-P'
If set, do not follow symbolic links when performing commands
such as `cd' which change the current directory. The
physical directory is used instead. By default, Bash follows
the logical chain of directories when performing commands
which change the current directory.
For example, if `/usr/sys' is a symbolic link to
`/usr/local/sys' then:
$ cd /usr/sys; echo $PWD
/usr/sys
$ cd ..; pwd
/usr
If `set -P' is on, then:
$ cd /usr/sys; echo $PWD
/usr/local/sys
$ cd ..; pwd
/usr/local
Try setting either 'set -o physical' or equivalently 'set -P' in your
$HOME/.bashrc file and you will always follow the physical path.
Hope that helps
Bob
> If I'm in /etc/init.d dir, and want to edit /etc/dhcpd.conf, I go
> vi ../dhcpd.conf
>
> However, this doesn't work.
>
> It seems that if you cd into a link to a directory, when you attempt to use
> "up one directory" it
> follows the "real" path, insted of the "linked" path.
>
> When you do a pwd, it reports the "linked" path, not the "real" path.
> EG:
> /etc/init.d is a link to /etc/rc.d/init.d.
>
> Here are some screen clips:
> ---8<cut here>8---
> [root@intdns1 /root]# cd /etc/init.d
> [root@intdns1 init.d]# pwd
> /etc/init.d
> [root@intdns1 init.d]# cd ..
> [root@intdns1 /etc]# ls -ld init.d
> lrwxrwxrwx 1 root root 11 May 30 17:18 init.d -> rc.d/init.d
> [root@intdns1 /etc]#
> ---8<cut here>8---
>
> Hope I gave you what you need to see the problem, or tell me to soak my
> head for being stupid!
>
> Have a good one.
>
>
> _______________________________________________
> Bug-sh-utils mailing list
> [EMAIL PROTECTED]
> http://mail.gnu.org/mailman/listinfo/bug-sh-utils
_______________________________________________
Bug-sh-utils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-sh-utils