Documentation

loc – count lines of code quickly

loc is a tool for counting lines of code. It’s a Rust implementation of cloc, but it’s more than 100x faster.

By default, loc will count lines of code in a target directory. You can also pass one or many targets for it to inspect. To see stats for each file parsed, pass the --files flag.

By default, the columns will be sorted by Code counted in descending order. You can select a different column to sort using the --sort flag.

loc can also be called with regexes to match and/or exclude files.

This is free and open source software.

Website: github.com/cgag/loc
Support:
Developer: Curtis Gagliardi
License: MIT License

Output from loc

loc is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Alternatives to cloc
TokeiDisplays statistics about your code
sccFast accurate code counter with complexity calculations and COCOMO estimates
SLOCCountSet of tools for counting physical Source Lines of Code
goclocA compact fast cloc tool seeking inspiration from Tokei
loccountRe-implementation of David A. Wheeler’s sloccount tool in Go
locRust implementation of cloc, but it’s more than 100x faster
tcountCount your code by tokens and patterns in the syntax tree
slocSimple tool to count source lines of code written in CoffeeScript
polyglotCommand-line tool that determines project contents
enryProgramming language detector based on go-enry
LinguistAssess a repository’s languages stats with github-linguist executable
CLOCTUITUI for CLOC
pygountCount source lines of code
oclocRust command-line utility that counts lines of code
OhcountSource code line counter and analysis library

Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted