Linux Commands To Check The Disk And Directory Information

Even though you can check the disk , directory information and usage using graphical user interface, it is important to now the terminal commands to check the disk information and usage of a Linux machine. In this tutorial am going to explain the important commands to check the disk and directory information in Linux systems.

There are two basic commands for the disk and directory. du and df. du deals with directories and df deals with disk.

du (abbrevation is disk usage): 

du command is used to determine the size of a directory. Lets say you have a directory demo and you have five directories named 1,2,3,4 and 5 inside demo. If your current directory is demo and if you use du it will show the size of folder inside it.

1. Displaying memory of directory in human readable form

2. Lets say you want to find out the total size of /Downloads folder , use the command below and last two lines will show the total size of the /Downloads folder .

If you just want to see the size use the tail command as follows to see the last two lines.

df (abbrevation is disk free):

1. df command gives the information about the disk space, mount point, used space, unused space and used space in percentage.

2. Getting the innode info.

Know More About Innodes 

3. Getting disk info in human readable form (Both Kb and Mb)

4.Getting all the info about file system and its type

5. Getting information about a specific file system type like ext3 or ext4

6. Getting information about the total memory of the disk.


SSL (Secure Socket Layer) is a protocol , which establishes a secure connection between a web browser and the server so…

Read more

Note: In Linux, everything is treated as files. Even folders are treated as files. There will be situations where…

Read more

When you interrupt yum installation and try to reinstall the package again , you are likely to get a transaction lock.…

Read more

Internet is huge! Help us find great content


Never miss a thing! Sign up for our newsletter to stay updated.


The Best Tutorials & Tips to Speedup Your DevOps Workflow.

Created by Bibin Wilson.



Udemy Black Friday Offer Courses For $9.99 For Limited Time