Get size of all code files in a directory

I got a question on how to get all files in a directory listing containing code.

This is what I used:

find . \( -name '*.bb*' -o -name '*.h*' -o -name '*.c*' -o -name '*akefile' -o -name '*.sh' -o -name '*.py*' \) -exec du -ch {} +
This entry was posted in Linux commandline and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *