How to find total file size in Linux
DOS sums up the sizes of all the files it lists when using the dir command, but Linux ls does not. Here’s an awk script that will calculate that information.
1 | ls -la [filenames] | awk '{ sum += $4 } END { print sum }' |
An easier command (thanks Sunny):
1 | du -hs * --total |









No Comments Yet