Skip to content
/ sloc Public

A useful script that finds the total lines of code (LOC) in a directory tree.

License

Notifications You must be signed in to change notification settings

Dandigit/sloc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sloc

A tiny Python script that finds the total lines of code in a directory tree.

Usage

python sloc.py cpp h

will find all files ending with .cpp and .h in the current directory tree, count how many lines they each have, and tell you the total.

python sloc.py -d /some/arbitrary/path py rb

will find all files ending with .py and .rb in the /some/arbitrary/path directory tree, count how many lines they each have, and tell you the total.