Inode 代表你主机套餐中的文件和文件夹数量。每个主机套餐都有固定的存储空间和 inode 配额。

要查看整个主机套餐的 inode 总数,请参考《如何查看资源使用情况》。

查看每个目录的磁盘用量与 inode 数量

有两种方式可快速查看每个文件夹(目录)的磁盘用量和 inode 数量:使用文件管理器或 SSH。

通过文件管理器

Hostinger panel menu with File Manager highlighted under File
Hostinger panel menu with File Manager highlighted under File
Hostinger toolbar with the Calculate directory sizes button highlighted
Hostinger toolbar with the Calculate directory sizes button highlighted
Hostinger file manager showing public_html directory size and inode counts column highlighted
Hostinger file manager showing public_html directory size and inode counts column highlighted
File manager context menu with the Info option highlighted on a selected folder
File manager context menu with the Info option highlighted on a selected folder
  1. 进入 网站(Websites)部分。
  2. 点击对应网站的“面板(Dashboard)”。
  3. 在侧边栏找到 文件管理器(File Manager)并点击。

打开要检查用量的文件夹(例如 public_html),点击右上角的“计算目录大小(Calculate directory sizes)”。在“大小(Size)”列中,将显示每个文件夹或文件的大小以及其中的 inode 数量。

或者,要查看单个目录的 inode 数量,可右键点击它并选择“信息(Info)”。在弹窗中点击“大小(Size)”旁的“显示(Show)”,即可看到该文件夹的大小及其中 inode 数量。

通过 SSH

Terminal showing inode usage counts per directory, with .domains highlighted as the largest folder
Terminal showing inode usage counts per directory, with .domains highlighted as the largest folder
Terminal showing du -shc output with per-directory disk usage and a total line highlighted
Terminal showing du -shc output with per-directory disk usage and a total line highlighted

若你使用的是 Premium 虚拟主机或更高套餐,也可通过 SSH 查看每个文件夹的 inode 数量与磁盘用量:
1. 通过 SSH 连接主机套餐。
2. 确保位于正确的目录(例如 public_html)。可运行 ls 命令查看,若不在目标目录,可逐个使用 ls 和 cd 命令。多数网站路径如下:

cd domains
cd domain.tld
cd public_html

请将 domain.tld 替换为你的实际域名。

  1. 进入正确目录后,运行以下命令:

查看 inode 数量(按降序排列):

find . -printf "%hn" | cut -d/ -f-2 | sort | uniq -c | sort -rn

查看磁盘用量(按降序排列):

du -shc * | sort -rh

来源:Hostinger 官方帮助文档