snippetbashTip
loc — Count lines of code. Written in Rust. More information: <https://github.com/cgag/loc>.
Viewed 0 times
linescommandrustwrittenclicodecountloc
Problem
How to use the
loc command: Count lines of code. Written in Rust. More information: <https://github.com/cgag/loc>.Solution
loc — Count lines of code. Written in Rust. More information: <https://github.com/cgag/loc>.Print lines of code in the current directory:
locPrint lines of code in the target directory:
loc {{path/to/directory}}Print lines of code with stats for individual files:
loc --filesPrint lines of code without
.gitignore (etc.) files (e.g. two -u flags will additionally count hidden files and dirs):loc {{[-u|--unrestricted]}}Code Snippets
Print lines of code in the current directory
locPrint lines of code in the target directory
loc {{path/to/directory}}Print lines of code with stats for individual files
loc --filesPrint lines of code without `.gitignore` (etc.) files (e.g. two `-u` flags will additionally count hidden files and dirs)
loc {{[-u|--unrestricted]}}Context
tldr-pages: common/loc
Revisions (0)
No revisions yet.