Commands to Check Disk Space in Linux

By | December 27, 2017

Check File System Disk Space Usage

The ‘df‘ command stand for “disk filesystem“, it is used to get full summary of available and used disk space usage of file system on Linux system.

This article explain a way to get the full information of Linux disk space usage with the help of ‘df‘ command with their practical examples. So, you could better understand the usage of df command in Linux.

Check File System Disk Space Usage

The “df” command displays the information of device name, total blocks, total disk space, used disk space, available disk space and mount points on a file system.

df

Display Information of all File System Disk Space Usage

it displays information of dummy file systems along with all the file system disk usage and their memory utilization.

df -a

Show Disk Space Usage in Human Readable Format

Have you noticed that above commands displays information in bytes, which is not readable yet all, because we are in a habit of reading the sizes in megabytes, gigabytes etc. as it makes very easy to understand and remember.

The df command provides an option to display sizes in Human Readable formats by using ‘-h’ (prints the results in human readable format

df -h

Display Information of File System in Bytes

To display all file system information and usage in 1024-byte blocks, use the option ‘-k‘ as follows.

df -k

Display Information of File System in MB

To display information of all file system usage in MB (Mega Byte) use the option as ‘-m‘.

df -m

Display Information of File System in GB

To display information of all file system statistics in GB (Gigabyte) use the option as ‘df -h‘.

df -h

Display Information of /home File System

To see the information of only device /home file system in human readable format use the following command.

df -hT/home

Display File System Inodes

Using ‘-i‘ switch will display the information of number of used inodes and their percentage for the file system.

df -i

Display Information of df Command.

Using ‘–help‘ switch will display a list of available option that are used with df command.

df –help

Category: VPS

Leave a Reply

Your email address will not be published. Required fields are marked *