How to use Linux system commands < two >----du

Source: Internet
Author: User
Tags disk usage

1> to display disk usage for a directory tree and every subtree Du/home/linuxThis shows the number of disk blocks in the/home/linux directory and each of its subdirectories. 2> to display the disk usage of a tree and each of its subtrees in 1024-byte units du-k/home/linuxThis shows the number of 1024-byte disk blocks in the/home/linux directory and each of its subdirectories. 3> Displays the disk usage of a directory tree and each of its subtrees in megabytes du-m/home/linuxThis shows the number of MB disk blocks in the/home/linux directory and each of its subdirectories. 4> Displays the disk usage of one directory tree and each subtree in gigabytes du-g/home/linuxThis displays the number of GB disk blocks in the/home/linux directory and each of its subdirectories. 5> View the size of all directories and subdirectories under the current directory: du-h."." Represents the current directory. can also be replaced by a clear path-H means to display the human form of K, M and G6> View the size of the user directory under the current directory, and do not want to see other directories and their subdirectories: Du-sh User- s means that a summary value is listed only du-h--max-depth=0 User--max-depth=n means that only deep into the nth-level directory, where set to 0, means not to go deep into subdirectories. 7> Lists the size of all directories and files under the user directory and its subdirectories: Du-ah User-a means including directories and files8> lists the size of the directory in the current directory that does not include the XYZ string: du-h--exclude= ' *xyz* '9> want to get more information about the user directory and the size of subdirectories on one screen: du-0h User0 (bar 0) indicates the information for each directory listed, not wrapping, but outputting the information of the next directory directly. 10> only shows all disk usage for one directory tree du-s/home/linux11> View each folder size: du-h--max-depth=1

How to use Linux system commands < two >----du

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.