Home » Questions » Computers [ Ask a new question ]

Linux, checking how much space is used in each partition

Linux, checking how much space is used in each partition

In windows, the "My Computer" view shows how much disk space each partition/volume has.

Asked by: Guest | Views: 286
Total answers/comments: 3
Guest [Entry]

At the bottom of every tab/window in nautilus it will display how much free space is on the drive you are currently browsing if you have no folders/files selected.
Guest [Entry]

"This is a reminder on the usage of sort with df:

df -alhk | sort -nk2 # list disk usage and sort by used blocks
df -alhT | sort -hk3 # show and sort by human-readable usage
df --si | sort -hk3 # (this one doesn't show the empty file systems)
df --si | sort -nk5 # sort by percentage full

Only file systems starting with '/dev' are disk partitions:

df -h | grep ^/dev

show partition type too, and hide some non-disk filesystems:

df -h -T
df -h --output=source,fstype,size,used,avail,pcent,target -x tmpfs -x devtmpfs

a better view:

pydf

list storage blocks:

lsblk

for block device attributes:

blkid

more time consuming but useful tools for examining disk usage:

du
du | xdu
ncdu
xdiskusage

Summarized from ""9 commands to check hard disk partitions and disk space on Linux"""
Guest [Entry]

Use the df command in a terminal window. I like to use the -k option to get the size in KBytes.