【问题标题】:Too many levels of symbolic links on current directory?当前目录上的符号链接级别太多?
【发布时间】:2011-12-28 23:27:58
【问题描述】:

在 Ubuntu 11.10 上的 NFS 共享目录中执行简单的“ls”时出现以下错误。

user@host[/android-master/external/iptables/extensions]
> ls -al
ls: reading directory .: Too many levels of symbolic links
total 580
drwxrwxr-x  2 stephen stephen 12288 2011-12-28 17:16 .
drwxrwxr-x 11 stephen stephen  4096 2011-12-28 17:16 ..
-rwxrwxr-x  1 stephen stephen   229 2011-12-28 17:16 filter_init
-rw-rw-r--  1 stephen stephen  6594 2011-12-28 17:16 GNUmakefile.in
-rw-rw-r--  1 stephen stephen  3286 2011-12-28 17:16 libip6t_ah.c
-rw-rw-r--  1 stephen stephen  4595 2011-12-28 17:16 libip6t_dst.c
-rw-rw-r--  1 stephen stephen   363 2011-12-28 17:16 libip6t_eui64.c

我很困惑我为什么会得到这个。当前目录不是符号链接(由父级 ls 确认)。

另外,当我在安装相同 NFS 路径的 Ubuntu 10.04 机器上执行相同的“ls”时,它没有这个问题。

这是来自 android 开源项目的 external/iptables/extensions 目录。也许它与 repo/git 相关?我确实在所有项目的 .git 目录中看到了很多损坏的符号链接:

user@host[/android-master/external/iptables/.git]
> ls -al
total 48
drwxrwxr-x  2 stephen stephen  4096 2011-12-28 17:16 .
drwxrwxr-x 11 stephen stephen  4096 2011-12-28 17:16 ..
lrwxrwxrwx  1 stephen stephen    52 2011-12-28 17:16 config -> ../../../.repo/projects/external/iptables.git/config
lrwxrwxrwx  1 stephen stephen    57 2011-12-28 17:16 description -> ../../../.repo/projects/external/iptables.git/description
-rw-rw-r--  1 stephen stephen    41 2011-12-28 17:16 HEAD
lrwxrwxrwx  1 stephen stephen    51 2011-12-28 17:16 hooks -> ../../../.repo/projects/external/iptables.git/hooks
-rw-rw-r--  1 stephen stephen 35645 2011-12-28 17:16 index
lrwxrwxrwx  1 stephen stephen    50 2011-12-28 17:16 info -> ../../../.repo/projects/external/iptables.git/info
lrwxrwxrwx  1 stephen stephen    50 2011-12-28 17:16 logs -> ../../../.repo/projects/external/iptables.git/logs
lrwxrwxrwx  1 stephen stephen    53 2011-12-28 17:16 objects -> ../../../.repo/projects/external/iptables.git/objects
lrwxrwxrwx  1 stephen stephen    57 2011-12-28 17:16 packed-refs -> ../../../.repo/projects/external/iptables.git/packed-refs
lrwxrwxrwx  1 stephen stephen    50 2011-12-28 17:16 refs -> ../../../.repo/projects/external/iptables.git/refs
lrwxrwxrwx  1 stephen stephen    54 2011-12-28 17:16 rr-cache -> ../../../.repo/projects/external/iptables.git/rr-cache
lrwxrwxrwx  1 stephen stephen    49 2011-12-28 17:16 svn -> ../../../.repo/projects/external/iptables.git/svn

packed-refs 和 svn 是断开的链接。不知道为什么,那是我必须看看的其他东西。

【问题讨论】:

    标签: android linux git unix repository


    【解决方案1】:

    尝试使用实际的“ls”命令,而不是 shell 的内置命令:

    > /bin/ls -al
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-26
      • 2015-07-14
      • 1970-01-01
      • 2021-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-12
      相关资源
      最近更新 更多