共计 2221 个字符,预计需要花费 6 分钟才能阅读完成。
clone linux 的源代码
git clone git@github.com:torvalds/linux.git
而后应用 cloc 统计代码,后果如下:
─➤ cloc .
80185 text files.
79650 unique files.
11303 files ignored.
github.com/AlDanial/cloc v 1.82 T=376.67 s (183.0 files/s, 91099.3 lines/s)
---------------------------------------------------------------------------------------
Language files blank comment code
---------------------------------------------------------------------------------------
C 32432 3301436 2591032 17027790
C/C++ Header 23563 709503 1364178 7074499
reStructuredText 3339 164958 67617 450601
JSON 506 2 0 360071
YAML 3485 64334 16122 299209
Assembly 1332 48392 101795 233500
Bourne Shell 941 29162 19938 114181
make 2808 11052 11922 50816
SVG 74 90 1171 48177
Python 183 8949 7559 45160
Perl 69 7562 5160 37635
Rust 55 1273 8094 7690
yacc 9 700 409 4919
PO File 6 948 1088 3733
lex 9 345 309 2114
C++ 10 373 138 2022
Bourne Again Shell 55 392 309 1611
awk 13 238 154 1373
Glade 1 58 0 603
NAnt script 2 153 0 537
Cucumber 1 34 58 196
TeX 1 6 74 156
CSS 3 41 60 136
Windows Module Definition 2 15 0 113
m4 1 15 1 95
XSLT 5 13 26 61
MATLAB 1 17 37 35
vim script 1 3 12 27
Markdown 1 8 0 25
Ruby 1 4 0 25
HTML 1 1 5 10
INI 1 1 0 6
sed 1 2 5 5
TOML 1 1 9 2
---------------------------------------------------------------------------------------
SUM: 68913 4350081 4197282 25767133
---------------------------------------------------------------------------------------
文件规模:
ncdu 1.14.1 ~ Use the arrow keys to navigate, press ? for help
--- /home/pon/code/me/github/linux -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4.5 GiB [##########] /.git
967.2 MiB [##] /drivers
144.2 MiB [ ] /arch
67.8 MiB [ ] /tools
66.7 MiB [ ] /Documentation
52.5 MiB [ ] /include
48.3 MiB [ ] /sound
45.8 MiB [ ] /fs
35.8 MiB [ ] /net
12.9 MiB [ ] /kernel
8.1 MiB [ ] /lib
5.3 MiB [ ] /mm
3.9 MiB [ ] /scripts
3.8 MiB [ ] /crypto
3.5 MiB [ ] /security
2.0 MiB [ ] /block
1.9 MiB [ ] /samples
768.0 KiB [ ] /rust
696.0 KiB [ ] MAINTAINERS
584.0 KiB [ ] /io_uring
296.0 KiB [ ] /virt
288.0 KiB [ ] /LICENSES
276.0 KiB [ ] /ipc
204.0 KiB [ ] /init
104.0 KiB [ ] CREDITS
80.0 KiB [ ] /usr
72.0 KiB [ ] Makefile
72.0 KiB [ ] /certs
28.0 KiB [ ] .mailmap
24.0 KiB [ ] .clang-format
4.0 KiB [ ] Kbuild
4.0 KiB [ ] .gitignore
4.0 KiB [ ] README
4.0 KiB [ ] Kconfig
4.0 KiB [ ] COPYING
4.0 KiB [ ] .rustfmt.toml
4.0 KiB [ ] .get_maintainer.ignore
4.0 KiB [ ] .gitattributes
4.0 KiB [] .cocciconfig
正文完