我所有的inode都在哪里使用? [英] Where are all my inodes being used?

查看:81
本文介绍了我所有的inode都在哪里使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何找出哪些目录负责修剪我的所有inode?

最终,根目录将负责最多数量的inode,因此我不确定到底要什么样的答案.

基本上,我的可用索引节点用完了,需要找到一个不需要的目录来剔除.

谢谢,对于这个模糊的问题表示歉意.

解决方案

因此,基本上,您正在寻找哪个目录中包含很多文件?这是它的第一个刺路:

find . -type d -print0 | xargs -0 -n1 count_files | sort -n

其中"count_files"是一个shell脚本(感谢乔纳森)

echo $(ls -a "$1" | wc -l) $1

How do I find out which directories are responsible for chewing up all my inodes?

Ultimately the root directory will be responsible for the largest number of inodes, so I'm not sure exactly what sort of answer I want..

Basically, I'm running out of available inodes and need to find a unneeded directory to cull.

Thanks, and sorry for the vague question.

解决方案

So basically you're looking for which directories have a lot of files? Here's a first stab at it:

find . -type d -print0 | xargs -0 -n1 count_files | sort -n

where "count_files" is a shell script that does (thanks Jonathan)

echo $(ls -a "$1" | wc -l) $1

这篇关于我所有的inode都在哪里使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆