03-05-2008 10:06 AM
My S/W developers are using C Shell in HP-UX 11.11.
One of them asked me about changing directory.
1) The current directory and result of "ls -al" are :
lrwxrwxrwx 1 ypark bksuser 42 Mar 3 10:25 test -> /export/bks/wsm/test
2) He changed directory into test :
3) He tried to return the previous directory, but couldn't :
I guess that it's csh's problem.
Is there anyone who solve it?
Solved! Go to Solution.
03-05-2008 10:14 AM
Make sure the shell patches for Posix, csh and ksh are installed.
Patch database http://itrc.hp.com
Owner of ISN Corporation
03-05-2008 11:06 AM
thought that "cd .." meant "go up one level
in the directory hierarchy", not "go back to
wherever I was before". "/export/bks/wsm" is
up one level from "/export/bks/wsm/test", so
it's working as I'd expect it to work.
> I guess that it's csh's problem.
That's one way to look at it.
If you want a way to return to a previous
directory, you might investigate pushd and
popd. "man csh".
03-05-2008 01:12 PM
"Relative path changes (such as cd ..), when in a symbolically linked directory, cause csh's knowledge of the working directory to be along the symbolic path instead of the physical path."
I read that as saying it should work as Robin99's developers appear to desire. However, in checking, I found the following:
AIX csh goes up the actual path, not the symbolic link. ksh goes back up the sym-link
Linux csh goes back up the symlink
HP-UX 11.0 - csh goes back up the actual path, not the symlink, ksh goes back up the symlink
of course, I'd question why developers "need" the csh....
03-05-2008 01:25 PM
If your developer's are bent on using 'csh' I would install 'tcsh' instead:
I would also suggest reading:
03-06-2008 10:38 PM
>I'd question why developers "need" the csh.
Right a real shell works fine, not the scummy csh.
Also, the pwd command will tell you the logical name by default. If you want the physical path, you need "pwd -P".
Also with a real shell, you can use "cd -".
03-10-2008 09:06 AM
Frankly speeking, I don't find how to change working directory instead of physical directory.
But my developer decided to use ksh.
03-12-2008 01:25 PM
csh thinks they are the same. sh/ksh has the concept of logical or physical path.
>But my developer decided to use ksh.
That's always a good idea. Either sh or ksh.