/bin/pwd
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Sep 15 05:37:40 AEST 1990
In article <2497 at idunno.Princeton.EDU> pfalstad at phoenix.Princeton.EDU (Paul John Falstad) writes:
-In article <13851 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
->No, on most systems there is no easier way than the obvious one of
->seeing where a succession of ".."s gets you.
-That was what I considered "the easy way." But how do you do that?
-For example, how do you find out the name of "."? You could find out
-its inode, and then check the previous directory to see which name
-matches its inode; but that only works until you get to the root of the
-filesystem your directory is mounted in (I don't mean "/"). What then? Do
-you have to check /etc/mtab?
Yes, you got it, exactly.
More information about the Comp.unix.questions
mailing list