df command on Linux (disk free)
The df command in Linux (disk free) shows the capacity used of a file system in terms of space and inodes.
An inode is a data structure that describes a file system object, which can be one of several things, including a file or directory. Each inode stores the attributes and the disk block location (s) of the object data. File system object attributes may include metadata (times of last change, access, and modification), as well as owner and permission data (e.g., group id, user id, permissions).
Since the number of inodes is directly linked to the number of files a device can store, it is possible that it will run out and we still have available disk space. This is rare, but it can happen when we have a huge number of small files. The number of inodes is defined in the formation of the disc.
It can take as a parameter the file system for which information is desired. If no file name is provided, df shows the space available on all currently mounted file systems. Disk space is shown in 1K blocks by default.
In this example the df shows the capacity of the disk mounted as root/:
/dev/mapper/cl-root 42954248 8079412 34874836 19%/
The df -i option shows the number of inodes available:
/dev/mapper/cl-root 21487616 174290 213326 1%/
Reading the occupied and available space can be done more easily with the -h option:
/dev/mapper/cl-root 41G 7.8G 34G 19%/
Without providing the file, the df shows information for all mounted disks: