In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
What is inode?
To understand inode, start with file storage.
Files are stored on the hard disk, and the smallest storage unit of the hard disk is called the "Sector". Each sector stores 512 bytes (equivalent to 0.5KB).
When the operating system reads the hard disk, it does not read sector by sector, which is too inefficient, but reads multiple sectors in succession at one time, that is, reading a "block" at one time. This "block", which consists of multiple sectors, is the smallest unit of file access. The most common size of a "block" is 4KB, that is, eight consecutive sector form a block.
File data is stored in "blocks", so obviously we must also find a place to store the "meta-information" of the file, such as the creator of the file, the date the file was created, the size of the file, and so on. The area where the meta-information of the file is stored is called inode, which is translated into Chinese as "index node".
Each file has a corresponding inode, which contains some information about the file.
II. The content of inode
1.inode contains the meta-information of the file, specifically, the following:
Number of bytes in the file
User ID of the file owner
Group ID of the file
Read, write and execute permissions of files
There are three timestamps for the file:
Ctime refers to the time when the file's properties were last changed.
Atime refers to the time when the file was last accessed
Mtime refers to the time when the file was last modified.
two。 You can use the stat command to view the inode information of a file
3. View only inode numbers
4. View file types
5. Link file
Hard link: the indoe number is the same as the source file
Soft connection: the number is different, but the idone number points to the name of the source file
6.inode node
(1)。 View Node
(2)。 Every time a file is created, the number of nodes is increased by 1. When the nodes are full, the file cannot be created even if there is memory.
7. Delete files by inode number
Find. / *-inum number-delete
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.