How to use commands to view the size of a directory under the subdirectory

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.