Finding links

Chris Torek chris at mimsy.umd.edu
Fri Oct 20 03:16:43 AEST 1989


# ln tumbolia tumbolia/tumbolia
			---famous last words of a new super user

In article <8222 at cbmvax.UUCP> ag at cbmvax.UUCP (Keith Gabryelski) writes:
>So, for example:
># I want to find all the file names for the inode corresponding to
># the file $HOME/aen.c.

Just to be pedantic, I will claim that you do not want *all* the file
names (there are an infinite variety) but rather all the `canonical'
file names.  For instance, the file

	/ful/chris/bin/floop

on this machine also has the following (non-interesting) names:

	/ful/chris/bin/../bin/floop
	/ful/chris/tex/../bin/floop
	/ful/chris/./bin/floop
	/u/cvl/../zeke/../../ful/lost+found/../chris/tmp/../bin/././floop

(not to mention all the names rooted at the current directory!).

4.[234]BSD actually puts a limit on the number of possible file names,
by having a kernel define called `MAXPATHLEN' used during name->inode
translation, so that you have to `cd' into a deeply nested directory
to go any deeper (after which a number of utilities crap out, just like
SysV :-) ).
-- 
`They were supposed to be green.'
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list