When the size of the disk exceeds the standard, there will be alarm prompts, if you know the DF and du command is a very wise choice.
DF can view the first-level folder size, usage scale, file system and its hang-in points, but there is nothing to file .
Du can view the size of files and folders .
It works well with both. For example, use DF to see which level of directory is too large, and then use DF to see the size of the folder or file, so you can quickly determine the crux of the problem.
For example:
df-h Filesystem Size used Avail use% mounted on/dev/mapper/volgroup-lv_root 36G 2.4G 31G 7%/ Tmpfs 499M 0 499M 0%/dev/shm/dev/vda1 485M 32M 428M 7%/boot
du-h--max-depth=1/usr/local/tomcat_8888/4.0K /usr/local/tomcat_8888/f:4.0k /usr/local/tomcat_ 8888/d:2.7m /usr/local/tomcat_8888/work6.8m /usr/local/tomcat_8888/lib4.0k /usr/local/tomcat_8888/ dblog200k /usr/local/tomcat_8888/conf48k /usr/local/tomcat_8888/temp242m /usr/local/tomcat_8888/ logs36m /usr/local/tomcat_8888/index88m /usr/local/tomcat_8888/webapps36m /usr/local/tomcat_ 8888/bin410m /usr/local/tomcat_8888/
View file and folder sizes under Linux