Linux Inodes: How Much Are They Same?

With the use of the computer, a lot of garbage will be generated in the system. Typically, the same file is saved in different locations. As a result, a large amount of disk space is occupied, and the system runs slower and slower.

As a Linux user, have you ever wondered how many Inodes in the file system are the same? Inode is an important concept in the Linux file system, which records information such as the owner, permission, and size of the file. In large-scale data storage, the number of Inodes is huge, and each Inode has a unique ID, but how many of these Inodes are the same? This article will explore this issue in depth.

So if your computer is running out of space, you can try to delete such files to free up some space. Under  Linux  , we can find the same file in the system by identifying the inode value of the file.

How to find the same file under Linux How to find the same file under Linux

An inode is a data structure that records all information about a file, except the file name and file content. If two or more files have the same inode value, even if their file names and locations are different, their contents, owners, and permissions are actually the same, and we can regard them as the same file.

This type of file is actually a so-called "hard link". Hard links have the same inode value but different filenames. The soft link is actually a shortcut, which points to the target file, but has its own inode value.

$ ls -l my* 
-rw-r--r-- 4 liangxu liangxu   228 Apr 12 19:37 myf

Guess you like

Origin blog.csdn.net/shengyin714959/article/details/130911172