Bill Landry wrote:
Dennis Peterson wrote the following on 3/6/2007 11:18 AM -0800:
Here is my latest script iteration, which now includes testing for
newer files before copying the file to the temp working directory
for testing, and when copying is done due to a newer file being
found, the original timestamps will be now preserved on the copied
files.
I took just a quick look but it appears you are doing a time
comparison to a moved file, not the original file. Also - with just a
teeny bit of work you can reduce this to a single each curl and rsync
invocation rather than two each.
Moved files retain their original date/time stamps. For the rsync
files, I am comparing to the original files that are held in the
/var/tmp/rsync directory:
rsync -a rsync://rsync.mirror.msrbl.com/msrbl/MSRBL-Images.hdb \
$rsync_dir/MSRBL-Images.hdb
test $rsync_dir/MSRBL-Images.hdb -nt MSRBL-Images.hdb && \
I'll take a look at your code, however, the whole reason for downloading
and testing the files one at a time was due to the fact that you cannot
scan an individual file in a directory without scanning all files in the
directory, as well as all files in the directory that the command is
executed from. This single file implementation seemed to overcome this
issue.
When I give clamscan the filename clam.txt to scan that is the only file
it scans and that's also the only reason that file exists. It is
suprising that on my 400 mhz sparc Netra server that it takes 22 seconds
to scan a single file. In fact it takes that long to discover a file is
empty. That seems a bit odd but there must be a reason that test is done
at the end and not the beginning of the db load.
dp
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html