zoukankan      html  css  js  c++  java
  • centos 安装cloc 代码统计工具

    # 下载
    https://jaist.dl.sourceforge.net/project/cloc/cloc/v1.64/cloc-1.64.tar.gz
    # 配置
    ## 解压
    tar zxvf cloc-1.64.tar.gz
    ## 配置环境变量
    vi /etc/profile
    export PATH=$PATH:/usr/local/src/cloc-1.64
    ## 生效配置文件
    source /etc/profile
    

    效果如下
    统计k8s代码

    [root@k8s-study kubernetes]# cloc .
    Digest::MD5 not installed; will skip file uniqueness checks.
       19901 text files.
       19831 unique files.                                          
        2632 files ignored.
    
    http://cloc.sourceforge.net v 1.64  T=91.73 s (188.8 files/s, 64775.8 lines/s)
    --------------------------------------------------------------------------------
    Language                      files          blank        comment           code
    --------------------------------------------------------------------------------
    Go                            14990         478788         826813        3616860
    JSON                            536              4              0         749841
    YAML                           1129           1202           1397         157269
    Bourne Shell                    336           6115          12090          30087
    Assembly                        108           1992           2613          11261
    Protocol Buffers                115           5302          17494          10530
    make                             66            526           1199           1937
    C/C++ Header                      1            399           4367            839
    Bourne Again Shell               14             91             74            777
    Lua                               1             30              4            475
    sed                               6              4             32            448
    Python                            7            119            157            412
    PowerShell                        3             41             80            176
    C                                 7             49             79            156
    HTML                              4              0              0              4
    --------------------------------------------------------------------------------
    SUM:                          17323         494662         866399        4581072
    --------------------------------------------------------------------------------
    [root@k8s-study kubernetes]#
    
  • 相关阅读:
    关于博客
    lua中table复制
    logstash收集慢查询日志配置
    logstash的timestamp使用日志中的日期
    logstash收集bash_history历史命令
    使用supervisord监控logstash
    logstash 2.2以上版本,nginx 错误日志切割
    结合ELK进行分析PV,构建异步的WAF
    正则匹配嵌套结构
    一道关于停车计费的问题
  • 原文地址:https://www.cnblogs.com/fb010001/p/14889252.html
Copyright © 2011-2022 走看看