Which of the following commands will display the inode usage of each mounted filesystem?
Correct Answer: B
Explanation
The df command is used to report the disk space usage of the filesystems on a Linux system. The -i option is used to display the inode usage of each mounted filesystem. An inode is a data structure that stores the metadata of a file or directory, such as its size, owner, permissions, etc. Each filesystem has a fixed number of inodes, which limits the number of files and directories that can be created on it. The df -i command shows the total number of inodes, the number of used and free inodes, and the percentage of inode usage for each filesystem. For example:
[tcarrigan@rhel ~]$ df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda2 1310720 83167
1227553 7% / devtmpfs 249974 386 249588 1% /dev tmpfs 251374 1 251373 1% /dev/shm tmpfs 251374 570
250804 1% /run tmpfs 251374 16 251358 1% /sys/fs/cgroup /dev/sda1 524288 312 523976 1% /boot tmpfs
251374 1 251373 1% /run/user/1000
The other options are not valid commands or options. The du command is used to estimate the disk usage of files and directories, but it does not have an -i option. The lsfs and printfs commands do not exist on a standard Linux system. References:
* Inodes and the Linux filesystem | Enable Sysadmin
* filesystems - Find where inodes are being used - Unix & Linux Stack ...
* filesystems - How much space does an inode occupy? - Unix & Linux Stack ...