Linux无法删除重复目录,无法删除Linux目录 – 无限递归

我们在支持我们的版本控制服务器的RHEL6 VM上有一个NFS挂载 – 最近,其中一个存储库有点疯狂,这就是我在服务器上找到的:

ls -latri repo.git/refs/heads/

total 28

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 .

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21

5551209 drwxr-xr-x. 3 git git 4096 Jun 1 22:09 ..

当我对着dir运行树时,它似乎是无限递归的 – 例如:

repo.git/refs/heads/

├──

│ ├──

│ │ ├──

│ │ │ ├──

│ │ │ │ ├──

│ │ │ │ │ ├──

│ │ │ │ │ │ ├──

│ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├──

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├──

我试图通过其inode ref删除存储库:

[root@node repo.git/refs]# ls -latri

total 16

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 heads

[root@node repo.git/refs]# find . -inum 5551210 -exec rm -rf {} \;

rm: cannot remove `./refs/heads': Directory not empty

find: `./refs/heads/': No such file or directory

find: `./refs/heads/': No such file or directory

我有点不知道在这里做什么 – ls -latri命令的inode信息似乎表明’heads’目录中有2个目录是head目录的硬链接?

关于如何清理它的任何想法都是最受欢迎的 – 我认为我已经解决了它导致的应用程序问题,但文件系统的更大问题需要排序.

谢谢!

编辑:附加输出位:

没有隐藏的字符:

[root@node repo.git/refs]# ls -latrib heads/

total 28

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 .

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21

5551209 drwxr-xr-x. 3 git git 4096 Jun 1 22:09 ..

但是当我实际上在头部目录时,这里有一些有趣的输出:

[root@node repo.git/refs/heads]# ls -latrib

ls: cannot access : No such file or directory

ls: cannot access : No such file or directory

total 12

? -?????????? ? ? ? ? ?

? -?????????? ? ? ? ? ?

5551210 drwxr-xr-x. 2 git git 8192 Jun 1 21:21 .

5551209 drwxr-xr-x. 3 git git 4096 Jun 1 22:09 ..

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值