How to list the size of each file and directory and sort by descending size in Bash?

后端 未结 11 1443
遥遥无期
遥遥无期 2020-12-07 08:02

I found that there is no easy to get way the size of a directory in Bash?

I want that when I type ls -, it can list of all the sum o

11条回答
  •  北海茫月
    2020-12-07 09:03

    you can use the below to list files by size du -h | sort -hr | more or du -h --max-depth=0 * | sort -hr | more

提交回复
热议问题