Gertjan Hofman scribbled on 7/6/06 1:37 PM:
> Peter
>
> Since you seem to be knowledgable on the subject and
> this question is probably simplistic - is there no way
> to limiting the max size of the file which is analyzed
> when not using -S prog ? It seems such a simple &
> useful feature, yet I can't find it. There is a
> directive to limit the number of bytes read but that
> isnt quite the same. I have a file system with massive
> .txt files (actually numberic data files) which I want
> to skip. Now that DirTree seems to work, I could do it
> in there I suppose, but Perl is not one the languages
> I speak.
>
Best to send to the list so everyone can learn.
If you want to skip certain directories or filenames, check out the
NoContents and IndexOnly config options.
Or, in DirTree.pl, alter the check_path() and/or check_dir() functions
to control which files get passed to swish-e. You might do something like:
sub check_path {
my $path = shift;
if ($path =~ m/\.txt$/i)
{
print STDERR "skipping $path\n";
return 0;
}
return 1; # return true to process this file
}
a simple regexp check is all that is needed in most cases.
--
Peter Karman . http://peknet.com/ . peter(at)not-real.peknet.com
Received on Thu Jul 6 12:11:18 2006