[1]du命令用来查看目录或文件所占用磁盘空间的大小.常用选项组合为: du -sh [2]若要查看一个目录下每个文件和文件夹的磁盘占用空间,使用如下命令: du -ah --max-depth=1 说明:a表示显示目录下所有的文件和文件夹(不含子目录), h表示以人类能看懂的方式, max-depth表示目录的深度. [3]查看当前目录下一级子文件和子目录占用的磁盘容量. du -lh --max-depth=1 [4]MacOS 系统的操作命令如下: du -h -d 1
du -ah --max-depth=1 这个是我想要的结果 a表示显示目录下所有的文件和文件夹(不含子目录),h表示以人类能看懂的方式,max-depth表示目录的深度. du -sh 目录 #查看目录的大小 du -sh 文件 #查看文件大小 du命令用来查看目录或文件所占用磁盘空间的大小.常用选项组合为:du -sh 一.du的功能:`du` reports the amount of disk space used by the specified files an
一.du的功能:`du` reports the amount of disk space used by the specified files and for each subdirectory (of directory arguments). with no arguments,`du` reports the disk space for the current directory. 很明显,与df不同,它用来查看文件或目录所占用的磁盘空间的大小. 二.du常用的选项: -h:以人类可