Simple operations on the file system

Source: Internet
Author: User
Article Title: simple operations on the file system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Now we know that the overall data of a disk is in the superblock block, but the size of each file is recorded in inode.

Df: list the total disk usage of the file system;

[Root @ www ~] # Df [-ahikHTm] [directory or file name]

Options and parameters:

-A: List all file systems, including the unique/proc file systems of the system;

-K: displays each file system based on the capacity of KBytes;

-M: displays the file systems with the capacity of MBytes;

-H: display data in easy-to-read formats such as GBytes, MBytes, and KBytes;

-H: Replace the carry mode of M = 1000 K with M = 1024 K;

-T: the filesystem name (for example, ext3) of the partition is also listed;

-I: displays the inode quantity instead of hard disk capacity.

Example 1: List all filesystems in the system!

[Root @ www ~] # Df

Filesystem 1K-blocks Used Available Use % Mounted on

/Dev/hdc2 9920624 3823112 5585444 41%/

/Dev/hdc3 4956316 141376 4559108 4%/home

/Dev/hdc1 101086 11126 84741 12%/boot

Tmpfs 371332 0 371332 0%/dev/shm

# In Linux, if df does not have any options, all

# (Excluding the archive system and swap in special memory) are listed as 1 Kbytes capacity!

# The/dev/shm is a memory-related mount. Ignore it first!

Example 2: display the capacity results in a readable capacity format

[Root @ www ~] # Df-h

Filesystem Size Used Avail Use % Mounted on

/Dev/hdc2 9.5G 3.7G 5.4G 41%/

/Dev/hdc3 4.8G 139 M 4.4G 4%/home

/Dev/hdc1 99 M 11 M 83 M 12%/boot

Tmpfs 363 M 0 363 M 0%/dev/shm

# Unlike Example 1, it will be displayed in the capacity format such as G/M, which is easy to see!

[1] [2] Next page

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.