Linux-inode随记

来自三线的随记
Admin讨论 | 贡献2020年10月22日 (四) 17:34的版本

inode数量是有上限的

linux中软硬链接主要体现在inode标识上


看inode编号

ls -il ./


理解inode https://www.ruanyifeng.com/blog/2011/12/inode.html

How can I find the number of files on a filesystem

$ man df 
-i, --inodes
              list inode information instead of block usage
$ df --inodes / /home
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda1            3981312  641704 3339608   17% /
/dev/sda8            30588928  332207 30256721    2% /home

$ sudo find / -xdev -print | wc -l
642070

$ sudo find /home -print | wc -l
332158

$ sudo find /home -type f -print | wc -l
284204


ps

prometheus node_exporter相关指标

# HELP node_filesystem_files Filesystem total file nodes.

# HELP node_filesystem_files_free Filesystem total free file nodes.