Linux 命令 查看文件大小命令 du 命令

du   estimate  the file space  usage  计算文件的空间使用

 

description 

 

-B, --block-size=SIZE

              scale sizes by SIZE before printing them;   以SIZE衡量大小

 -c, --total

              produce a grand (宏伟的,重要的)    total  ,该选项会在最后列出所有文件大小的总和

 

admin@ip:/var/www$ du  -cd 1

334672 ./quzheng

24 ./html

334704 .

334704 total

 

-d   --max-depth=1  列出要显示的目录深度

-h   human readable

 -S, --separate-dirs

              for directories do not include size of subdirectories  不包括子目录文件大小,显示大小为子目录以外的文件大小

 -t, --threshold(入口  门槛)=SIZE

              exclude (排除  驱赶) entries smaller than SIZE if positive, or entries greater than SIZE if negative 设置显示的文件大小限制。

 

admin@ip:/var/www$ du  -ct  25k  -d 1

334672 ./quzheng

334704 .

334704 total

 

你可能感兴趣的:(linux)