How to find the N largest files in a git repository?

后端 未结 9 1683
青春惊慌失措
青春惊慌失措 2020-12-12 14:33

I wanted to find the 10 largest files in my repository. The script I came up with is as follows:

REP_HOME_DIR=
max_huge_files=         


        
9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-12 14:58

    For completion, here's the method I found:

    ls -lSh `git ls-files` | head
    

    The optional -h prints the size in human-readable format.

提交回复
热议问题