how to find total size of all files whose names starting with a*
how to find total size of all files whose names starting with a*
OS: SunOS du -h a* is giving individual file sizes. Thanks, Raj |
Code:
perl -le' |
Quote:
Thanks Radoulov. |
How about simply reading the du man page?
Code:
du -h -c a* (Edit: D'oh! Just noticed the note about using SunOS. Please ignore this if your version of du doesn't have that option. ;) ) So here's an awk solution instead: Code:
du -hb a* | awk '{ total+=$1 } END{ print total/1024"k" }' |
Quote:
|
Quote:
Notice also that the OP posted this in "Linux Newbie" instead of "Other *NIX" like he should have. |
Quote:
|
All times are GMT -5. The time now is 01:54 PM. |