ONE NET WIKI Free and professional IT Wiki

How to check disk space in Linux

2018-08-30 ONE NET WIKI

1.jpg

1. 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

1.png

2. Display information of all File System Disk Space Usage

The same as above, but it also displays information of dummy file systems along with all the file system disk usage and their memory utilization.

df -a

2.png

3. Show Disk Space Usage in Human Readable Format

The df command provides an option to display sizes in Human Readable formats by using ‘-h’ which prints the results in human readable format (e.g., 1K 2M 3G).

df -h

3.png

4. 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

4.png

5. Display information of File System in Bytes

To display all file system information and usage in 1024-byte blocks, use the option ‘-k‘ (e.g. –block-size=1K) as follows.

df -k

1.png

6. 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

5.png

7. 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

3.png

8. 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

8.png

9. Display File System Type

To check the file system type of your system use the option ‘T‘. It will display file system type along with other information.

df -T

9.png

10. Include Certain File System Type

If you want to display certain file system type use the ‘-t‘ option.

df -t ext4

10.png

11. Exclude Certain File System Type

If you want to display file system type that doesn’t belongs to ext3 type use the option as ‘-x‘.

11.png

12. Display information of df command.

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

df --help

12.png

Editor's Note: All the articles in this website are original. If reproduced, please indicate the source and link.
398
0
All Comments (0)
Expand to publish a comment

Web Development


Web Management


Web Marketing


Web Security