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.

Bill
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html

Reply via email to