Symbolic Links for Lunks (Re-Thunk)
karron at MCIRPS2.MED.NYU.EDU
karron at MCIRPS2.MED.NYU.EDU
Tue Aug 14 02:48:07 AEST 1990
I guess that you wrote tlink(1) ? It looks like you have done what I wanted to
do only did not think about it yet. Great!
You might want to get sgi to put a cross reference in the man page for link to
your tlink. That would clue us in to your good work.
Dangling links:
Here is how I get dangling links ...
cut-----------------------------------------------------------------------
#! /bin/sh
# run this below / so you don't hit your head
# on the root directory...
rm -rf D.DangleDirectory REAL_FILE
cd $HOME
mkdir D.DangleDirectory
echo "THE REAL FILE CONTENTS" > REAL_FILE
pwd
ln -s REAL_FILE D.DangleDirectory/SYMLINK
ls -l REAL_FILE
ls -l D.DangleDirectory/SYMLINK
cat D.DangleDirectory/SYMLINK
cd D.DangleDirectory
pwd
ls -l SYMLINK
cat SYMLINK
echo "try more qualified names"
cd $HOME
ln -s ./REAL_FILE ./D.DangleDirectory/SYMLINK1
ls -l REAL_FILE
ls -l ./D.DangleDirectory/SYMLINK1
cat ./D.DangleDirectory/SYMLINK1
cd D.DangleDirectory
pwd
ls -l ./SYMLINK1
cat ./SYMLINK1
echo "now try doing it the expected way"
cd $HOME
cd D.DangleDirectory
pwd
ln -s ../REAL_FILE SYMLINK2
ls -l ../REAL_FILE
ls -l SYMLINK2
cat SYMLINK2
echo "try fully qualified names"
cd $HOME
pwd
ln -s $HOME/REAL_FILE $HOME/D.DangleDirectory/QUALIFIED_LINK
ls -l $HOME/REAL_FILE
ls -l $HOME/D.DangleDirectory/QUALIFIED_LINK
cat $HOME/D.DangleDirectory/QUALIFIED_LINK
cd D.DangleDirectory
pwd
ls -l QUALIFIED_LINK
cat QUALIFIED_LINK
exit 0
cut-----------------------running the above will give you this-----------------
/karron
-rw-r--r-- 1 root mail 23 Aug 13 11:41 REAL_FILE
l--------- 1 root mail 9 Aug 13 11:41 D.DangleDirectory/SYMLINK
-> REAL_FILE
cat: cannot open D.DangleDirectory/SYMLINK
/karron/D.DangleDirectory
l--------- 1 root mail 9 Aug 13 11:41 SYMLINK -> REAL_FILE
cat: cannot open SYMLINK
try more qualified names
-rw-r--r-- 1 root mail 23 Aug 13 11:41 REAL_FILE
l--------- 1 root mail 11 Aug 13 11:41 ./D.DangleDirectory/SYMLIN
K1 -> ./REAL_FILE
cat: cannot open ./D.DangleDirectory/SYMLINK1
/karron/D.DangleDirectory
l--------- 1 root mail 11 Aug 13 11:41 ./SYMLINK1 -> ./REAL_FILE
cat: cannot open ./SYMLINK1
now try doing it the expected way
/karron/D.DangleDirectory
-rw-r--r-- 1 root mail 23 Aug 13 11:41 ../REAL_FILE
l--------- 1 root mail 12 Aug 13 11:41 SYMLINK2 -> ../REAL_FILE
THE REAL FILE CONTENTS
try fully qualified names
/karron
-rw-r--r-- 1 root mail 23 Aug 13 11:41 /karron/REAL_FILE
l--------- 1 root mail 17 Aug 13 11:41 /karron/D.DangleDirectory/
QUALIFIED_LINK -> /karron/REAL_FILE
THE REAL FILE CONTENTS
/karron/D.DangleDirectory
l--------- 1 root mail 17 Aug 13 11:41 QUALIFIED_LINK -> /karron/
REAL_FILE
THE REAL FILE CONTENTS
+-----------------------------------------------------------------------------+
| karron at nyu.edu Dan Karron |
| . . . . . . . . . . . . . . New York University Medical Center |
| 560 First Avenue \ \ Pager <1> (212) 397 9330 |
| New York, New York 10016 \**\ <2> 10896 <3> <your-number-here> |
| (212) 340 5210 \**\__________________________________________ |
+-----------------------------------------------------------------------------+
More information about the Comp.sys.sgi
mailing list