Amount of Space on Drive Used by Certain Files
For the total disk space of files matching “searchstring”
ls -l | awk '/searchstring/ {space = space + $5} END {print space}'
Or for the total of all files:
ls -l | awk '{space = space + $5} END {print space}'
Comments
Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!