> 
> At 10:11 AM 9/8/2006, Dennis Peterson wrote:
> >Noel Jones wrote:
> >>cat big.list.of.files | xargs clamscan
> >
> >xargs is still limited by max line length, so this needs 
> >to be done with care. Perl can also be used in place of 
> >clamdscan to feed file names to clamd (which must be run 
> >as root). The advantage of Perl is it can iterate over an 
> >array and of course manage all the logging.
> 
> The general purpose of xargs is to split a huge list into 
> chunks less than max line length - lather, rinse, and 
> repeat.  While the xargs command itself ("clamscan" in the 
> example) is subject to max line length, the input 
> ("big.list.of.files") is not.

I brain-farted - the output is piped to xargs so the command line length
is not a factor. 

Hopefully the list is also properly escaped and or quoted. xargs is pretty
unhappy with filenames that have special characters in them, or spaces. This is
true no matter how the list is submitted to the scanner. This is the gripe
I have against using 'find' without sanitizing the output.

dp
_______________________________________________
http://lurker.clamav.net/list/clamav-users.html

Reply via email to