Recently want to install a larger software on the computer, but the computer space is not enough, at a time do not know what is the content of the directory occupied space love relatively large, after the query summarized as follows:
1, DF-HL
Query speed is relatively fast, you can directly locate the largest space-occupying disk partitions, but you can not specify a specific directory |
2, Du-h--max-depth=n n=1 represents only the size of the first-level subdirectory of the directory in which the command executes
You can also add-H to the Du--max-depth=1-h, which means that the display space is displayed in a human-readable manner.
Du can specify the specific directory and directory depth of the query, and other common options are as follows:
-H: Displayed in a human-readable way- A: Displays the amount of disk space occupied by the directory, and also shows the size of the disk space under which the directory and file is being consumed- S: Displays the amount of disk space occupied by the directory, and does not display the amount of disk space the subdirectory and file occupy- C: Displays the amount of disk space occupied by several directories or files, and also counts their sums--apparent-size: Displays the size of the directory or file itself-L: Statistics hard link takes up disk space size- L: The amount of disk space the file that the statistical symbolic link points to occupies
Du-sh: View the total capacity of the current directory. Without individually listing the capacity occupied by each subkey
DU-LH--max-depth=1: View the disk capacity occupied by sub-files and subdirectories in the current directory.
How to use commands to view the size of a directory under the subdirectory