Questions tagged [inode]

An inode (index node) is a data structure found in many Unix file systems. Each inode stores all the information about a file system object (file, device node, socket, pipe, etc.), except data content and file name.

Each file is associated with an inode, which is identified by an integer number, often referred to as an i-number or inode number. Inodes store the following information about files and directories (folders):

  • Inode number

  • Mode information to discern file type

  • Number of links to the file

  • UID of the owner

  • Group ID (GID) of the owner

  • Size of the file

  • Actual number of blocks that the file uses

  • Time last modified

  • Time last accessed

  • Time last changed

On many types of file system implementations, the maximum number of inodes is fixed at file system creation, limiting the maximum number of files the file system can hold. A typical allocation heuristic for inodes in a file system is one percent of total size. The inode usage can typically be found by running du -hi.

The inode number indexes a table of inodes in a known location on the device; from the inode number, the file system driver portion of the kernel can access the contents of the inode, including the location of the file allowing access to the file.

A file's inode number can be found using the ls -i command. The ls -i command prints the i-node number in the first column of the report.

Further Reading:

  1. Speaking UNIX: It is all about the inode
  2. Wikipedia entry on inodes.
63 questions
1
vote
0 answers

How many inodes does a folder use?

I'm on Ubuntu 18.04. I have a folder with lots (several hundreds thousands) files. I would like to see how many inodes does this folder use on the file system. How to achieve that? The df -i command applies on the whole file system, I need to be…
s.k
  • 1,280
0
votes
2 answers

Which Linux header(s) to remove?

I have run out of inodes (IUse% = 100%) and when I run the command from this answer, /usr/src contains the largest number of files (linux-headers*). Based on this answer, I want to remove the old linux-headers but I am confused as to which are the…
Bernmeister
  • 1,231