Linux basics: how to get the total index nodes of the root partition

On Linux and other Unix-like operating system, a description inode information stored files or directories (ie file, because it was all files in Unix) with the exception, but its name and content or actual data. Thus, each file node index by an index, the index node metadata about the file.

Inode contains the following information: the physical location of the file, the file size, owner and group files, file permissions (read, write, and execute), and the time stamp counter indicating the number of hard links to the file.

Why is it important to pay close attention to inode?

One possible method is insufficient file system space when all inodes are used up. Even if there is enough free space on the disk, it will happen. File system using all index nodes may prevent you create a new file. In addition, this may cause the system to suddenly stop.

To obtain the directory (eg root directory) index nodes in a file, open a terminal window and run the following ls command, where the -l option represents a long list format, -a all of the files, -i represents the index number to print each file .

How to obtain the total index nodes of the root partition 

Listed in the directory inode

To get the total number of index nodes of the root directory, run the following command du.

How to obtain the total index nodes of the root partition

To list the root partition statistics about the usage of index nodes (available amount, used amount, percentage of the available amount and use) with df command (-h flag allows to display information in human-readable form) in the following manner.

How to obtain the total index nodes of the root partition

For detailed definition of inode, please read the Linux Information Project article: http: //www.linfo.org/inode.html.

Guess you like

Origin www.linuxidc.com/Linux/2020-01/161995.htm
Recommended