Linux DF view hard disk usage du view file size

Source: Internet
Author: User
Tags disk usage

DF is commonly used to view disk usage.

Du is commonly used to view the size of a folder.


Linux commands:


DF [-ahikhtm] [directory or folder]

Parameters:

-H: Display the usage of 1111000KB-XXXMB in a way that is easier to recognize, by default in KB

-I: Do not use disk capacity, with the number of inode to display

-A: List all file systems, including system-specific/proc and other file systems

-K: Display the file system in KB capacity (default)

-M: Display file system in MB capacity

-H: Substituting 1000 for 1024 in binary mode

-T: Along with the file system name of the partition (EXT3), etc. also listed


Example:

Df



Df-h



Df-ah



df-h [Dirname|filename]





===============================================




Du [-ahskm] file or directory name

-S: Lists the total, not each individual directory occupancy capacity!!!!

-H: Display in an easy-to-read manner (g/m)

-A: Lists all files and directory capacity, by default only the amount of files in the statistics directory

-S: does not include totals under the directory, and is different from-s

-K: List capacity Display in KB

-M: Displays the capacity in megabytes



Example:

List files in the current directory in kilobytes | Folder occupancy size

Du-s./*




List size in person-aware way

Du-sh./*




Sort by KB final display of top 5, measured in KB units



Other:

Linux DF view hard disk usage du view file size

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.