View disk and directory capacity under Linux--df, du

Source: Internet
Author: User
Tags readable disk usage

DF: Lists the overall disk usage of the file system;

Du: Evaluating the disk usage of the file system (commonly used to estimate the capacity of the catalog)

DF parameter:

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

-K: Displays each file system in KB capacity

-M: Display the file system in MB capacity

-H: Self-display in GB,MB,KB and other formats that are easier for people to read

-H: Replace m=1024k's carry mode with m=1000k

-T: Along with the file system name for the partition (for example, Ext3) is also listed

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

Example:

① under Linux, if DF does not have any parameters, the default is to list all of the system (the file system without special memory and swap) in 1KB capacity.

Filesystem: Indicates which partition the file system is on, so list the device name

1k-blocks: Note that the following number unit is 1KB, can use- h or- m to change the capacity

Used: Unused hard disk space

Available: The remaining disk space size

use%: Disk usage

Mountedon: The directory where the disk is mounted (mount point)

② display of capacity results in an easy-to-read capacity format

③ all special file formats and names in the system are listed

④ the available disk capacity below/etc is displayed in a readable capacity format

⑤ Lists the number of inode numbers currently available in each partition

Du parameters:

- A: Lists all files and directory capacity, because the default is only the amount of files under the statistics directory;

-H: displayed in a more readable capacity format (g/m);

-S: lists the total, not each individual directory that occupies the capacity;

-S: does not include totals under subdirectories, and is somewhat different from-s;

-K : Displays the capacity in kilobytes;

-M : Displays the capacity in megabytes .

Example:

① List all file sizes in the current directory

② with example one, but also lists the file's capacity

③ check the capacity of each directory below the root directory

Unlike DF ,du will find all the file data directly in the file system.

Du-s Displays the total file size (without subdirectories) in the current directory, and du displays the total capacity (including subdirectories) for all files in that directory at the end.

View disk and directory capacity under Linux--df, 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.