From: hardingdgh@aol.com (HARDINGDGH)
Subject: Q? Resolve true pwd, not sym-link
Date: 1996/10/25 [thread overview]
Message-ID: <54pg5t$4qs@newsbf02.news.aol.com> (raw)
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 <file_spec_possibly_containing_symbolics>
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
next reply other threads:[~1996-10-25 4:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-25 4:00 HARDINGDGH [this message]
1996-10-25 4:00 ` Q? Resolve true pwd, not sym-link Phil Farrell
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox