Linux view file and directory size (du command)

Source: Internet
Author: User
when using Ubuntu at work or in daily use, it is often time to look at the current system capacity, which requires us to use the command to query the size of the current directory or file (DU) syntax format [plain] du [-ahskm] file or directory name
Parameter explanation-A: Lists all files and directory capacity, because the default is only the capacity of the statistics directory-H: Display in a more readable capacity format (g/m/k), automatically select the display unit size-S: List the total, not each individual directory occupancy capacity-K: Display in kilobytes- M: Display common command reference in MB view current directory size [plain] du-sh.
View a specified directory size [plain] du-sh directory_name display 10 maximum (minimum) directories or files in a specified directory maximum: [plain] Du-sh * | Sort-nr | Head min: [php] Du-sh * | Sort-n | Head

Linux view file and directory size (du command)

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.