[clamav-users] How to get each file status when scan a ditrtectory using clamdscan
crazy thinker
crazythinker91 at gmail.com
Tue Oct 4 12:22:38 EDT 2016
Hi
@kris
The second option you suggested won't work if the dirtectory have mutiple
subdirtectories. please find below example..I want to see same output as
like calmscan output when we perform recurisve scan over dirtectory that
contains mutiple subdirtectories.
root at backbencher:~#* /usr/local/clamav/bin/clamdscan ~/C++/**
*/root/C++/Constructors: OK*
*/root/C++/CvsC++: OK*
*/root/C++/diffOput: OK*
*/root/C++/FOL: OK*
*/root/C++/Inhertiance: OK*
*/root/C++/OOL: OK*
*/root/C++/referencesInC++: OK*
*/root/C++/StructureVSClass: OK*
----------- SCAN SUMMARY -----------
Infected files: 0
Time: 0.459 sec (0 m 0 s)
root at backbencher:~#* ls -alh ~/C++/**
*/root/C++/Constructors:*
total 28K
drwxr-xr-x 2 root root 4.0K Apr 16 22:19 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 11K Apr 16 20:48 a.out
-rw-r--r-- 1 root root 801 Apr 16 20:48 ex1.cc
-rw-r--r-- 1 root root 801 Apr 16 21:00 ex2.cc
*/root/C++/CvsC++:*
total 64K
drwxr-xr-x 2
root root 4.0K Apr 16 09:20 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 6.8K Apr 16 09:19 a.out
-rw-r--r-- 1 root root 137 Apr 16 08:55 ex1.c
-rw-r--r-- 1 root root 150 Apr 16 08:57 ex1.cc
-rw-r--r-- 1 root root 96 Apr 16 09:00 ex2.c
-rw-r--r-- 1 root root 132 Apr 16 09:02 ex2.cc
-rw-r--r-- 1 root root 74 Apr 16 09:06 ex3.c
-rw-r--r-- 1 root root 116 Apr 16 09:08 ex3.cc
-rw-r--r-- 1 root root 56 Apr 16 09:10 ex4.c
-rw-r--r-- 1 root root 56 Apr 16 09:10 ex4.cc
-rw-r--r-- 1 root root 120 Apr 16 09:12 ex5.c
-rw-r--r-- 1 root root 120 Apr 16 09:12 ex5.cc
-rw-r--r-- 1 root root 92 Apr 16 09:18 ex6.c
-rw-r--r-- 1 root root 163 Apr 16 09:20 ex6.cc
*/root/C++/diffOput:*
total 40K
drwxr-xr-x 2 root root 4.0K Apr 16 11:28 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 6.6K Apr 16 11:28 a.out
-rw-r--r-- 1 root root 74 Apr 16 11:20 ex1.c
-rw-r--r-- 1 root root 74 Apr 16 11:20 ex1.cc
-rw-r--r-- 1 root root 208 Apr 16 11:25 ex2.c
-rw-r--r-- 1 root root 208 Apr 16 11:25 ex2.cc
-rw-r--r-- 1 root root 73 Apr 16 11:28 ex3.c
-rw-r--r-- 1 root root 73 Apr 16 11:27 ex3.cc
*/root/C++/FOL:*
total 28K
drwxr-xr-x 2 root root 4.0K Apr 16 13:50 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 9.7K Apr 16 13:50 a.out
-rw-r--r-- 1 root root 91 Apr 16 13:48 ex1.cc
-rw-r--r-- 1 root root 417 Apr 16 13:50 ex2.cc
*/root/C++/Inhertiance:*
total 28K
drwxr-xr-x 2 root root 4.0K Apr 21 10:08 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 8.4K Apr 21 10:08 a.out
-rw-r--r-- 1 root root 404 Apr 21 09:59 ex1.cc
-rw-r--r-- 1 root root 419 Apr 21 10:08 ex2.cc
*/root/C++/OOL:*
total 32K
drwxr-xr-x 2 root root 4.0K Apr 21 09:56 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 9.8K Apr 21 08:04 a.out
-rw-r--r-- 1 root root 458 Apr 16 22:39 BinaryOOL.cc
-rw-r--r-- 1 root root 591 Apr 21 09:34 IOool.cc
-rw-r--r-- 1 root root 426 Apr 16 22:11 UnaryOOL.cc
*/root/C++/referencesInC++:*
total 48K
drwxr-xr-x 2 root root 4.0K Apr 16 12:14 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 7.5K Apr 16 12:14 a.out
-rw-r--r-- 1 root root 177 Apr 16 11:56 ex1.cc
-rw-r--r-- 1 root root 134 Apr 16 11:59 ex2.cc
-rw-r--r-- 1 root root 300 Apr 16 12:05 ex3.cc
-rw-r--r-- 1 root root 134 Apr 16 12:10 ex4.cc
-rw-r--r-- 1 root root 133 Apr 16 12:14 ex5.cc
-rw-r--r-- 1 root root 12K Apr 16 13:03 .ex5.cc.swp
*/root/C++/StructureVSClass*:
total 32K
drwxr-xr-x 2 root root 4.0K Apr 16 17:55 .
drwxr-xr-x 10 root root 4.0K Apr 21 09:56 ..
-rwxr-xr-x 1 root root 6.8K Apr 16 17:55 a.out
-rw-r--r-- 1 root root 177 Apr 16 17:52 ex1.cc
-rw-r--r-- 1 root root 174 Apr 16 17:53 ex2.cc
-rw-r--r-- 1 root root 264 Apr 16 17:54 ex3.cc
-rw-r--r-- 1 root root 258 Apr 16 17:55 ex4.cc
root at backbencher:~#
On 4 October 2016 at 21:05, Kris Deugau <kdeugau at vianet.ca> wrote:
> crazy thinker wrote:
> > Hi,
> >
> > I would you like to get each file status call back in *Clamdscan
> output*
> > while perfrom scan over a dirtectory using *clamdscan*. but i able to
> get
> > a file status call back *(OR | ERROR| FOUND)* in *Clamdscan output*
> when
> > i perfrom scan over a *single file.*
>
> After a bit of testing this looks to be the difference between:
>
> clamdscan /path/to/directory
>
> and
>
> clamdscan /path/to/directory/*
>
> Is there any reason you can't do the second?
>
> Unfortunately I don't see any command-line options that might allow the
> first call to produce exactly the same output as the second.
>
> Generally the only files that are "interesting" in the results are the
> ones that did get flagged - is there some specific reason you need the
> "OK" results explicitly listed as well?
>
> -kgd
> _______________________________________________
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
>
More information about the clamav-users
mailing list