由于文件损坏,无法删除linux下的目录

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并忘记它.

上一篇:基于Linux的域管理解决方案?


下一篇:linux-如何处理apache*享服务器上的带宽计费?