From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e3ed42d432c6d354,start X-Google-Attributes: gidfee84,public From: hardingdgh@aol.com (HARDINGDGH) Subject: Q? Resolve true pwd, not sym-link Date: 1996/10/25 Message-ID: <54pg5t$4qs@newsbf02.news.aol.com>#1/1 X-Deja-AN: 191896297 sender: root@newsbf02.news.aol.com organization: America Online, Inc. (1-800-827-6364) reply-to: hardingdgh@aol.com (HARDINGDGH) newsgroups: comp.unix.osf.osf1 Hi, I am trying to force unix (ksh or csh) to give my the 'true' name of a directory, not the symbolic link name of a directory. Below (rather lengthy I appologize) I give an example of what I am trying to do because I do not trust my unix vocabulary to properly convey my needs. I am a recent 'convert' from VAX/VMS and I am still working my way up the learning curve. I am working on a Dec ALPHA 8250 (#?). To hasten my movement around the system I have symbolicly created subdirectories off my home directory to directories that I most often work in. ie from my home dir (/home/m248262) I have done the following: ln -s /data/t45sdf/r100/loads t45sdf Now say I want to access a fortran program in data/t45sdf/r100/aero from my home directory I might say: vi t45sdf/../aero/aopt1.f My problem is that when I specify files to a fortran I often want to use symbolic references to save myself keystrokes. At the same time I want to resolve where the file really is because to document my work I write out the name of my input and output data files to a log file. I have done some coding in fortran where I will write a script file like this: #!/bin/csh cd echo $cwd > /home/m248262/targetdir.out Then I have a fortran subroutine which will launch this script, and another subroutine which will read the targetdir.out file. But I have found that in some cases that the 'echo $cwd' will return the symbolic name of a subdirectory rather than the 'true' directory name. For example I might say from my home dir cd t45sdf and the dir name returned from 'echo $cwd' is the symbolic link '/home/m248262/t45sdf' but what I want to see is the 'true' directory '/data/t45sdf/r100/loads' If you know of a way to resolve this could you please email me at my work email Many Thanks! David Harding m248262@decux1.mdc.com