finding the missing links
Donald E. Hager
hager at ksuvax1.cis.ksu.edu
Wed May 31 03:57:31 AEST 1989
In article <207 at flattop.UUCP> rcm at flattop.UUCP (Ron McDowell) writes:
>At the risk of starting another 'RTFM' war, I'd like the answer to a simple
>question:
>
>$ echo "hello world" > $HOME/xxx ; ln xxx /tmp/yyy ; ln xxx /usr/tmp/zzz
>
>I do a 'ls -l /tmp' and see that yyy has 3 links. How can I find the other
>two files?
The other two files are xxx and zzz. Whenever you do a 'ln', it doesn't
create another copy of the file, but instead it "links" (or "points")
the file to the same inode. If you do an "ls -i $HOME/xxx /tmp/yyy
/usr/tmp/zzz" you will see that all the files have the same inode
number. I hope this helps.
--
Donald Hager (hager at ksuvax1.cis.ksu.edu) | // // ===== // //
KSU Dept. of Computing & Information Sciences | // // //___ // //
BITNET: hager at KSUVAX1 | //=<< // // //
UUCP: {rutgers,atanasoff,texbell}!ksuvax1!hager | // // ===== ======
More information about the Comp.unix.questions
mailing list