kpathsea: Database format
5.5.3 Database format
---------------------
The "database" read by Kpathsea is a line-oriented file of plain text.
The format is that generated by GNU (and most other) 'ls' programs given
the '-R' option, as follows.
* Blank lines are ignored.
* If a line begins with '/' or './' or '../' and ends with a colon,
it's the name of a directory. ('../' lines aren't useful, however,
and should not be generated.)
* All other lines define entries in the most recently seen directory.
/'s in such lines will produce possibly-strange results.
* Files with no preceding directory line are ignored.
For example, here's the first few lines of 'ls-R' (which totals about
30K bytes) on my system:
bibtex
dvips
fonts
ls-R
metafont
metapost
tex
web2c
./bibtex:
bib
bst
doc
./bibtex/bib:
asi.bib
btxdoc.bib
...