Skip to content

[stat] -L 对符号链接报 ENOENT(GNU 解引用并输出目标信息) #1652

Closed

Description

@caomengxuan666

现象

stat -L link → stat: cannot statx 'link': No such file or directory,rc=1;GNU 跟随链接输出目标信息。

复现

$d = "$env:TEMP\stat-L"; Remove-Item -Recurse -Force $d -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path $d | Out-Null
"hello" | Set-Content "$d\a.txt"; cmd /c mklink "$d\lnk" "$d\a.txt"
& "...\stat.exe" -L -c "%F %s" "$d\lnk" ; "rc=$LASTEXITCODE"

GNU 9.4(expected):regular file 6,rc=0。

WinuxCmd 1.2.1(actual):stat: cannot statx 'lnk': No such file or directory,rc=1。

Activity

  1. added
    compat-gap
    on Nov 14, 2026
  2. caomengxuan666 commented on Nov 14, 2026

    @caomengxuan666
    MemberAuthor

    修法车道接手(队长派):stat -L 解引用面,工作区 fix-winx-1652,GNU coreutils 9.4 stat.c 为语义源,修法 + 回归钉,首提交即 draft PR。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

compat-gap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions