V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
northisland
V2EX  ›  问与答

请教, ls -al 为什么会产生这样的 2 段输出?

  •  
  •   northisland · Dec 5, 2018 · 1796 views
    This topic created in 2710 days ago, the information mentioned may be changed or developed.

    有一个很乱的文件夹,内容都是软链接来的文件夹。ls -al会产生令我不解的输出,向大家请教。

    输入 ls -al 会产生 2 段输出, 第 1 段把所有文件遍历一遍,说都找不到,产生 total 文件数。 al#1

    第 2 段产生正常的 long listing format al#2

    直接 ls 的结果正常 ls#1

    4 replies    2018-12-06 15:28:32 +08:00
    aborigine
        1
    aborigine  
       Dec 6, 2018 via iPhone   ❤️ 1
    软链过去的文件 /文件夹没了?
    northisland
        2
    northisland  
    OP
       Dec 6, 2018 via iPhone
    @aborigine 是的。有一部分没了
    aborigine
        3
    aborigine  
       Dec 6, 2018   ❤️ 1
    @northisland #2 第一段输出的应该就是没有的那部分链接
    northisland
        4
    northisland  
    OP
       Dec 6, 2018
    @aborigine 好像不是,因为软链没失效的文件,也在第一段输出里显示了。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1131 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 23:04 · PVG 07:04 · LAX 16:04 · JFK 19:04
    ♥ Do have faith in what you're doing.