find / -iname '*.dat' -type f -print0 | xargs -0 du -hsc
Change / in the find to something more appropriate, / tells it to start at the root of the drive so that may not be what you want and will take longer. The -type f part tells it to only look for files, not directories. The -print0 and xargs -0 makes things cleaner when passing to du (disk usage).
|