1.1 C
New York
Sunday, March 9, 2025

Inspecting disk house on Linux



$ alias bysize="ls -lhS"

Utilizing the fdisk command

The fdisk command can present helpful stats in your disk partitions. Right here’s an instance:

$ sudo fdisk
fdisk: unhealthy utilization
Attempt 'fdisk --help' for extra data.
$ sudo fdisk -l
Disk /dev/sda: 14.91 GiB, 16013942784 bytes, 31277232 sectors
Disk mannequin: KINGSTON SNS4151
Items: sectors of 1 * 512 = 512 bytes
Sector measurement (logical/bodily): 512 bytes / 512 bytes
I/O measurement (minimal/optimum): 512 bytes / 512 bytes
Disklabel kind: gpt
Disk identifier: 818C0FC9-CBBA-49E5-953B-A511A4E40A3D

Gadget Begin Finish Sectors Dimension Kind
/dev/sda1 2048 1230847 1228800 600M EFI System
/dev/sda2 1230848 3327999 2097152 1G Linux filesystem
/dev/sda3 3328000 31277055 27949056 13.3G Linux filesystem

Disk /dev/zram0: 3.7 GiB, 3967811584 bytes, 968704 sectors
Items: sectors of 1 * 4096 = 4096 bytes
Sector measurement (logical/bodily): 4096 bytes / 4096 bytes
I/O measurement (minimal/optimum): 4096 bytes / 4096 bytes

Disk /dev/loop0: 103.99 MiB, 109043712 bytes, 212976 sectors
Items: sectors of 1 * 512 = 512 bytes
Sector measurement (logical/bodily): 512 bytes / 512 bytes
I/O measurement (minimal/optimum): 512 bytes / 512 bytes

Disk /dev/loop1: 8.44 MiB, 8847360 bytes, 17280 sectors
Items: sectors of 1 * 512 = 512 bytes
Sector measurement (logical/bodily): 512 bytes / 512 bytes
I/O measurement (minimal/optimum): 512 bytes / 512 bytes

Utilizing the lsblk command

The lsblk command supplies very helpful data in your disk partitions. The output proven beneath clearly reveals that the disk (sda) had three partitions and their sizes and mount factors.

$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 104M 1 loop /var/lib/snapd/snap/core/16928
loop1 7:1 0 8.4M 1 loop /var/lib/snapd/snap/gping/13
sda 8:0 0 14.9G 0 disk
├─sda1 8:1 0 600M 0 half /boot/efi
├─sda2 8:2 0 1G 0 half /boot
└─sda3 8:3 0 13.3G 0 half /house
/
zram0 252:0 0 3.7G 0 disk [SWAP]

Wrap-up

These instructions described on this submit might help you consider disk storage, diagnose disk utilization points and handle disk house successfully.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles