1. DF can view the level of folder size, usage ratio, file system and its mount point, but not for the file (see only the windows of the similar C disk, D disk)
Du can view the size of files and folders, more useful
2. [Ia@i5a6 ~]$ Df-h
Parameter-H indicates the use of "human-readable" output, that is, in the file system size using GB, MB, and other readable format (compare the parameters used, compared to you do not count the number of bytes)
3. Du: Querying for file or folder disk usage space
Specifies the number of layers in the Drill-down directory, parameters: –max-depth=
[Ia@i5a6 ~]# du-h–max-depth=1/usr/local/webserver/
These two instructions can basically view the corresponding file occupancy and reach the cleanup information provided.
Du: Querying for file or folder disk use space
If you have a large number of files and folders in the current directory, you can iterate through the space used by all files and folders by using commands with no parameters du. This is a bad place to see if it's too big, so specify the number of layers in the Drill-down directory, Parameters:--max-depth=, which is a very useful parameter! For example, note that you can use "*" to get the size of the file space.
Reminder: It has always been ordered to be more complex than Linux, and its du command specifies that the number of layers in the Drill-down directory is simpler than Linux, FreeBSD.
The following is a code fragment:
[Root@bsso yayu]# du-h--max-depth=1 work/testing
27M Work/testing/logs
35M work/testing
[Root@bsso yayu]# du-h--max-depth=1 work/testing/*
8.0K work/testing/func.php
27M Work/testing/logs
8.1M Work/testing/nohup.out
8.0K work/testing/testing_c.php
12K work/testing/testing_func_reg.php
8.0K work/testing/testing_get.php
8.0K work/testing/testing_g.php
8.0K work/testing/var.php
[Root@bsso yayu]# du-h--max-depth=1 work/testing/logs/
27M work/testing/logs/
[Root@bsso yayu]# du-h--max-depth=1 work/testing/logs/*
24K Work/testing/logs/errdate.log_show.log
8.0K Work/testing/logs/pertime_show.log
27M Work/testing/logs/show.log