Search code examples
linuxbashfindwczcat

Linux, Find > zcat > wc


a have many zip files on my system. I need to calculate quantity of symbol all of them. But my command doesn't work:

[[email protected] ~]$ find /RAID/s.korea/onlyzip/ -name *.zip -type f -exec zcat {} \; |wc -c

gzip: /RAID/s.korea/onlyzip/00/node/2015-03.compare15.zip has more than one entry--rest ignored
gzip: /RAID/s.korea/onlyzip/00/node/2015-03.compare16.zip has more than one entry--rest ignored
gzip: /RAID/s.korea/onlyzip/00/node/2015-03.compare17.zip has more than one entry--rest ignored
gzip: /RAID/s.korea/onlyzip/00/node/2015-03.compare18.zip has more than one entry--rest ignored
gzip: /RAID/s.korea/onlyzip/00/node/2015-03.compare19.zip has more than one 

But if i just zcat /RAID/s.korea/onlyzip/00/node/2015-03.compare19.zip it work fine. Could you help me please?


Solution

  • You can use the --quiet option :

    find /RAID/s.korea/onlyzip/ -name "*.zip" -type f -exec zcat -q {} \; |wc -c
    

    Beware of the " " around the pattern.