第一種:
- cd 進入到目標目錄
- 輸入 type
- 輸入
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l
第二種:
-
安裝 cloc
brew install cloc
-
cd 進入目標目錄
-
統計
cloc ./
-
排除某文件夾代碼,常見 pods
cloc ./ --exclude-dir=Pods
=================================================================
個人博客
Github
個人公衆號:Flutter小同學
個人網站