Given a list of files in files.txt, I can get a list of their sizes like this:
files.txt
cat files.txt | xargs ls -l | cut -c 23-30
which pr
I would use "du" instead.
$ cat files.txt | xargs du -c | tail -1 4480 total
If you just want the number:
cat files.txt | xargs du -c | tail -1 | awk '{print $1}'