If the kpse utils could export a path in the normal linux PATH syntax kpsewhich -expand-path="`kpsewhich -show-path=tex`" >/tmp/k The result has some 8880 directories and is ~500K on my system. -k