0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

inode番号について

Last updated at Posted at 2021-03-23

LPICの勉強をしている際にinode番号について調べてみたので自分用にまとめます。

参考記事

inode番号とは|「分かりそう」で「分からない」でも ...
wikipedia

まとめ

表示方法

lsコマンドにiオプションを指定すれば表示ができる。
または、findコマンドのinumオプション。
ls -liなどの併用も可。
下の写真はls -iのみ実行した例。
Screen Shot 2021-03-23 at 19.05.07.png
一番左に表示されている番号がinode番号。(ls -li を実行しても一番左に表示される。)

inode番号の使用状況はdf -iでみる。
IUseが100%に近いのであればそのディレクトリではファイルを作成できない可能性がある。

詳細

1.inodeの数は有限。

2.最大に達したら、いらないファイルを削除する必要がある。

3.ファイルには以下の属性を所持しなければならないらしい。
・ファイルの長さ
・デバイスID
・ファイル所有者のユーザーID
・ファイルのグループID
・ファイルシステム内でファイルを識別する inode 番号
・ファイルモード
・タイムスタンプ群
・inode を指すハードリンクがいくつあるかを示す参照カウント

これらを保持しているデータ。

4.ハードリンクの場合はinodeが同じだけど、シンボリックリンクは違う値が割り振られる。

余談みたいに書いてあったけど、
ReiserFSなどの最近のUnix系ファイルシステムでは inode を使用していないらしい。

この記事が役に立つ人は少ないと思いますが、役に立てたら嬉しい^_^です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?