[comp.unix.questions] directory "indexer"

tpersky@suntory.dcrt.nih.gov (Ted Persky) (08/14/90)

It has come to my attention that our staff on the whole spends
a great deal of time during the day searching for that one
certain file in a large directory tree.  For example, try finding
a certain fragment of source code in the X11 distribution.
The people in our lab always seem to be asking each other
to help them locate the path name for "foo.c".

What I'm wondering is whether anyone knows of a tool where
one can define a directory as being the root of a "large file
tree" and have an index of some sort placed at that root.  After
that is created, each person who creates a file in that particular
sub-tree would type in some sort of librarian command to create
an entry in the index with a brief description of the file.
Then the index (in database form, preferably) could be queried
to locate the path name for a desired file.  This would be ideal
if people such as MIT could create this for their distributions
of X, or UNIX vendors for their source distributions.

If you could send me e-mail concerning this, I'd greatly appreciate
it.

Thanx,

	Ted Persky			phone: (301) 496-2963
	Building 12A, Room 2031		Internet: tpersky@alw.nih.gov
	National Institutes of Health
	Bethesda, MD 20892

hartman@ide.com (Robert Hartman) (08/15/90)

In article <335@nih-csl.nih.gov> tpersky@alw.nih.gov (Ted Persky) writes:
>It has come to my attention that our staff on the whole spends
>a great deal of time during the day searching for that one
>certain file in a large directory tree.  For example, try finding
>a certain fragment of source code in the X11 distribution.
>The people in our lab always seem to be asking each other
>to help them locate the path name for "foo.c".

If you have the BSD version of find, you can use the "fast-find" feature to
build the database you want.

This wasn't documented very well in the BSD man page.  However, if you can
get at a copy of a Sun 4.x man page, it's documented there.

-r

stluka@software.org (Fred Stluka) (08/17/90)

In article <335@nih-csl.nih.gov> tpersky@alw.nih.gov (Ted Persky) writes:
> The people in our lab always seem to be asking each other
> to help them locate the path name for "foo.c".
> ...
> What I'm wondering is whether anyone knows of a tool where
> one can define a directory as being the root of a "large file
> tree" and have an index of some sort placed at that root.  After
> that is created, each person who creates a file in that particular
> sub-tree would type in some sort of librarian command to create
> an entry in the index with a brief description of the file.
> Then the index (in database form, preferably) could be queried
> to locate the path name for a desired file.  This would be ideal
> if people such as MIT could create this for their distributions
> of X, or UNIX vendors for their source distributions.

Can't help you with the solution you recommend (an indexer),
but if you are open to other solutions...

Teach the "people in the lab" about the "find" command.
You can even make it more convenient for them, by defining
an alias:

	alias dirr 'find . -name \!* -print | sort'

which allows them to cd to the root of the tree where the 
file is known to reside and type:

	dirr foo.c

Encourage them to use it on the smallest tree they know
to contain the file because the search is slow.

--Fred

Fred Stluka                          Internet: stluka@software.org
Software Productivity Consortium     UUNET:    ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070