Search Machine for Ubuntu machine
Ted Hilts
thilts at mcsnet.ca
Fri Aug 29 18:10:15 UTC 2008
Carl Friis-Hansen wrote:
> Ted Hilts - Thunderbird Acct. wrote:
>
>> I have Ubuntu 7.10 and would like to get an open source search engine
>> which I can use on this machine. I would like to tell it what hard
>> drive and/or directory to search and tell it to search for a file and/or
>> contents of a file. It would also be nice if it was written in perl or
>> java or java script or python or some other script or language but not
>> compiled. Even a bash shell with bash commands. Also, I would like it
>> to be a server so clients from other machines (like XP) could access the
>> search domain. I suppose I could use a browser as client which gives
>> Apache a CGI script with the results back to the browser but I am
>> hoping not to develop this application but rather (at least initially)
>> to pick up a search application ready to go.
>>
>
> I could suggest a small PHP or perl script.
>
> ///// With PHP /////
> Let the user fill in a form field.
> Send the request, something like
>
> shell_exec(
> "find /fromHere -type f -wholename '$someScope' etc...",
> $output );
>
> print "Result:<br />$output<br />";
> ////////////////
>
> If you have many files and is concerned about speed, then you might want
> to use locate instead of find.
>
> PHP has a function to filter out malicious commands. You want to pass
> the user's search string through this before you use the search string
> in $someScope.
>
> Your question is a bit off topic, so you might benefit from Google for
> Perl and PHP scripts out there in the big world.
>
>
Carl:
I was hoping for an open source package which if it exists would put
this request on topic. However I certainly appreciate your response.
I picked up a PHP manual many years ago but never got around to using
PHP. I am hoping to initially avoid any development. I could not find
a Ubuntu or Debian package for a search engine but that does not mean
there isn't one. I do have the beginnings of a bash based search engine
which I found in some VAX Digital reference books. But as I said, I'm
hoping for an open source package -- preferably Ubuntu..
Thanks again Carl -- Ted
More information about the ubuntu-users
mailing list