I'm thinking in terms of using 'File::Find' to build up a list, but this seems ... well, a bit inefficient to me - traversing a whole directory structure, in order to feed a virus scanner a list that'll... then traverse the file structure again.
But "traversing a whole directory structure" will take a very tiny fraction (much smaller than 1/1,000,000) of the amount of time that "traversing a whole directory structure + scaning each file" will take, so does this inefficiency matter?

If you can efficiently feed a virus scanner 1 file (or better a list of say 1,000 files), you might as well use 'File::Find' to build up a list of all files (even if this takes a few hours), then feed the virus scanner from the list.

If you can only give the virus scanner a path to scan, you could have a folder called 'scan' or somthing, create (hard / symbolic?) links to the next N files (*) in the 'File::Find' list, tell the virus scanner to scan the 'scan' folder, when it's finished remove the links and repeat.
(*) If you wanted each scan to take a simiar-ish time, rather than the next N files, you'd be better adding files until they totalled between a lower MB limit and upper MB limit.

I've got the feeling I must have missed something here...

In reply to Re: Splitting up a filesystem into 'bite sized' chunks by zork42
in thread Splitting up a filesystem into 'bite sized' chunks by Preceptor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.