由于文件损坏,无法删除Linux下的目录
时间:2020-03-05 18:56:07 来源:igfitidea点击:
kt@rails-ubuntu:~/rails/ledger/releases/20080820144914/.git/hooks$ ls -al ls: cannot access post-commit: No such file or directory ls: cannot access update: No such file or directory ls: cannot access post-update: No such file or directory ls: cannot access commit-msg: No such file or directory ls: cannot access pre-rebase: No such file or directory ls: cannot access post-receive: No such file or directory ls: cannot access pre-applypatch: No such file or directory ls: cannot access pre-commit: No such file or directory total 8 drwxrwxr-x 2 kt kt 4096 2008-09-09 18:10 . drwxrwxr-x 4 kt kt 4096 2008-09-09 18:10 .. -????????? ? ? ? ? ? commit-msg -????????? ? ? ? ? ? post-commit -????????? ? ? ? ? ? post-receive -????????? ? ? ? ? ? post-update -????????? ? ? ? ? ? pre-applypatch -????????? ? ? ? ? ? pre-commit -????????? ? ? ? ? ? pre-rebase -????????? ? ? ? ? ? update
解决方案
回答
首先,这是问题,格式正确(在<pre>标记中将其括起来即可得到):
kt@rails-ubuntu:~/rails/ledger/releases/20080820144914/.git/hooks$ ls -al ls: cannot access post-commit: No such file or directory ls: cannot access update: No such file or directory ls: cannot access post-update: No such file or directory [snip]
无论如何,我们需要以单用户模式启动并运行fsck。如果我们现在无法重新引导,只需将目录移至/ tmp并忽略它。
回答
(a)看起来我们有某种文件系统问题;我建议我们运行fsck,看看它是否能找到任何东西
(b)确实不是与编程相关的问题,因此不在这里。