Jerod Santo

Buy the truth, and do net sell*
📡 RSS 📥 News 🖇️ LinkedIn 🐙 GitHub 📸 Instagram 📧 Contact 🎙️ 𝕏

CLOC Counts Lines of Code

If you ever find yourself in a foreign code base and want to get a quick overview of exactly how much code is in it, CLOC is just the tool for the job.

It’s easy to install on OS X:

$ brew install cloc

And on Debian-based Linuxes:

$ aptitude install cloc

To use it, simply cd into the root directory and run:

$ cloc .

The default output will show you a breakdown by language. Here’s an example of what it’ll look like:

php much?

You can, of course, customize the poop out of it as well.

cloc --help to nerd out.