Linux view file and directory size

Source: Internet
Author: User
Tags sort

Cause work or day-to-day use of Ubuntu, often encounter the view of the current system capacity, this time we need to use the command to query the current directory or the size of the file directory (DU) syntax format [plain] du [-ahskm] file or directory name

Parameter Interpretation-A: Lists all files and directory capacity, because the default is only the capacity of the catalog-H: In the more readable capacity format rendering (g/m/k) display, automatically select the display of the unit size-s: To list the total, and not list each individual directory occupancy K: Display in kilobytes-M: Display common command Reference in MB view the current directory size [plain] du-sh./

View a specified directory size [plain] du-sh Directory_name displays 10 largest (smallest) directories or files under the specified directory maximum: [plain] Du-sh * | Sort-nr | Head min: [php] Du-sh * | Sort-n | Head

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.