From fc2335b7576d7f9ee4c893cd71e5e49b2b1433f5 Mon Sep 17 00:00:00 2001 From: "chen.yang" Date: Tue, 3 Aug 2021 09:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20Cloc=20=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A1=8C=E6=95=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chen.yang --- .../Applications/Cloc/Cloc_统计代码行数.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Software/Applications/Cloc/Cloc_统计代码行数.md diff --git a/Software/Applications/Cloc/Cloc_统计代码行数.md b/Software/Applications/Cloc/Cloc_统计代码行数.md new file mode 100644 index 0000000..0672538 --- /dev/null +++ b/Software/Applications/Cloc/Cloc_统计代码行数.md @@ -0,0 +1,34 @@ +# Cloc 统计代码行数 + +Cloc 可以统计项目中不同语言的代码行数,非常简单。 + +## 1.安装 + +```bash +# Ubuntu +apt install cloc +``` + +## 2.使用 + +进入到需要统计的目录执行以下命令: + +```bash +cloc . + 20 text files. + 19 unique files. + 5 files ignored. + +github.com/AlDanial/cloc v 1.82 T=0.02 s (952.3 files/s, 57913.6 lines/s) +------------------------------------------------------------------------------- +Language files blank comment code +------------------------------------------------------------------------------- +Go 14 150 95 699 +Markdown 1 10 0 11 +JSON 1 0 0 8 +------------------------------------------------------------------------------- +SUM: 16 160 95 718 +------------------------------------------------------------------------------- +``` + +注意后面有个“.”表示当前目录。