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):
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 .
du -c -h /Downloads
If you just want to see the size use the tail command as follows to see the last two lines.
du -c -h /Downloads | tail -2
df (abbrevation is disk free):
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
df - t ext3
6. Getting information about the total memory of the disk.
df -h --total