New Tricks: disk space management tools in Linux

Source: Internet
Author: User
Article Title: a beginner: Linux system disk space management tool. 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.

1. fdisk-l

Disk/dev/sda: 120.0 GB, 120034123776 bytes => hard Disk capacity: 120 GB

255 heads, 63 sectors/track, 14593 cylinders => 255 heads, 63 sectors, 14593 cylinders

Units = cylinders of 16065*512 = 8225280 bytes => the capacity of each cylinders is 8225280

=> Storage capacity = number of tracks (cylinders) X number of magnetic heads X number of sectors X number of bytes per sector

14593x255x63x512 = 111.788G

Cylindrical capacity = number of cores x number of sectors X number of bytes per sector x 255x63x512 = 8225280 B

In fact, hard disk manufacturers generally calculate according to 1G = 1000

Disk identifier: 0xc3ffc3ff

Device Boot Start End Blocks Id System => start indicates that a partition starts from X cylinder.

/Dev/sda1*1 3824 30716248 + 7 HPFS/NTFS

/Dev/sda2 3825 10199 51200000 7 HPFS/NTFS

/Dev/sda3 10200 12596 19253902 + 5 Extended

/Dev/sda4 12597 14593 16040902 + 12 Compaq diagnostics

/Dev/sda5 10200 10211 96358 + 83 Linux

/Dev/sda6 10212 10454 1951866 82 Linux swap/Solaris

/Dev/sda7 10455 11548 8787523 + 83 Linux

/Dev/sda8 11549 12596 8418028 + 83 Linux

2. df: This command can be used to view the disk usage and the location where the file system is mounted.

Filesystem 1K-blocks Used Available Use % Mounted on

/Dev/sda7 8649544 1986948 6223220 25%/

Tmpfs 1033648 0 1033648 0%/lib/init/rw

Udev 10240 136 10104 2%/dev

Tmpfs 1033648 0 1033648 0%/dev/shm

/Dev/sda5 93307 19997 68493 23%/boot

Related Article

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.