Skip to main content

Disk / Storage

Disk usage

du <option> <path>
OptionDescription
-hHuman readable
-sSummarize: Display only a total for each argument

Sort human readable disk usage

du -hs <path> | sort -h -r

Disk free space

df <option>
OptionDescription
-hDisk free space in human readable format

List block devices

lsblk

List devices UUID (GUID)

lsblk { -f | --fs }
blkid
ls /dev/disk/by-uuid/

ionice

I/O nice / priority

Get I/O priority of process

ionice [-p <PID>]

Set I/O priority of process

ClassDescription
0None
1Realtime
2Best-effort
3Idle
# <level> = 0 to 7, only for best-effort and realtime
ionice
{ -c | --class } <class>
[{ -n | --classdata } <level>]
{ <command> | -p <PID> }