查看文件

查询当前目录总大小可以使用du -sh,其中s代表统计汇总的意思,即只输出一个总和大小。

通过命令du -h –max-depth=1 *,可以查看当前目录下各文件、文件夹的大小,这个比较实用。

同样,通过命令du -h –max-depth=0 *,可以只显示直接子目录文件及文件夹大小统计值。

如果只想查看指定目录的总大小,可以使用du -sh 目录名称。

对于指定文件夹也可以指定显示层次深度,如du -h --max-depth=0 software/及du -h --max-depth=1 software/

 

 find / -type f -size +100M 

 find / -type f -size +100G 

 
posted @ 2020-10-23 15:50  zzl0916  阅读(288)  评论(0编辑  收藏  举报