As a continuation of my last post, here is a command if you want to find the total combined size (in kilobytes) of a set of folders or files listed in a text file named file-list.txt
.
$ find -print -maxdepth 1 | grep -Fxf file-list.txt | xargs du -k | awk '{total=total+$1} END {print total}'