Skip to content

Welcome to Tech by Example

Menu
  • Home
  • Posts
  • System Design Questions
Menu

How to find the size/space of disks and volumes attached to the server

Posted on June 17, 2021June 17, 2021 by admin

Using ‘df -h’ command

Syntax

df -h Mount name/Filesystem

Examples:

[root@macbpro git-spec]# df -h
filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.8G     0  7.8G   0% /dev
tmpfs           7.8G  332K  7.8G   1% /dev/shm
tmpfs           7.8G   49M  7.8G   1% /run
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/vda1        99G   53G   42G  57% /
tmpfs           512M  174M  339M  34% /tmp
tmpfs           1.6G     0  1.6G   0% /run/user/0

[root@macbpro git-spec]# 

[root@macbpro git-spec]# df -h /
filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        99G   53G   42G  57% /

[root@macbpro git-spec]# df -h /dev
filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.8G     0  7.8G   0% /dev

[root@macbpro git-spec]# 

[root@macbpro git-spec]# df -h /dev/vda1
filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        99G   53G   42G  57% /

[root@macbpro git-spec]# 

Note:- For the “Filesystem” and “Mount name”, please refer to first and last column in 1st example respectively.

©2025 Welcome to Tech by Example | Design: Newspaperly WordPress Theme