Hello,
Our ftp collection is getting biggish and I want to make
life a bit easier for our users.
I would like to implement the "index" command so a caller
could say
quote site index foobar
and get back the locations of files whose name included foobar.
Looking at the wu-ftpd code it appears that wu-ftpd basically
executes the command "index foobar" and sends the result
back to the user.
My initial idea is to construct a "statically" linked version
of
1) grep/egrep/awk...
2) write a small c program, statically linked, named "index"
3) when "index foobar" is executed the small program would
invoke "grep foobar Ls-lR" (Ls-lR is the file resulting
from doing and ls -lR on the ftp directory.)
4) Put "index", "grep" and the Ls-lR file in the /bin directory
of the ftp root.
Is this the basic idea of how to do this, is there a better way?
What are the security concerns?
--Jerry LeVan