mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
552 B
Plaintext
26 lines
552 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# loc
|
|
|
|
> Count lines of code. Written in Rust.
|
|
> More information: <https://github.com/cgag/loc>.
|
|
|
|
- Print lines of code in the current directory:
|
|
|
|
`loc`
|
|
|
|
- Print lines of code in the target directory:
|
|
|
|
`loc {{path/to/directory}}`
|
|
|
|
- Print lines of code with stats for individual files:
|
|
|
|
`loc --files`
|
|
|
|
- Print lines of code without `.gitignore` (etc.) files (e.g. two `-u` flags will additionally count hidden files and dirs):
|
|
|
|
`loc {{[-u|--unrestricted]}}`
|