Skip to content

'ls -l' in symbolic link directory on Windows lists the link itself instead of the target directory contents #7873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chengwu26 opened this issue May 2, 2025 · 1 comment

Comments

@chengwu26
Copy link

​Description​​

When using ls -l inside a symbolic link directory (created as a symlink to another directory) on ​​Windows​​, the command only displays the symbolic link itself rather than the contents of the target directory. This behavior does NOT occur when running ls without the -l flag.

# ls -l
total 0
dr-xr-xr-x 1 somebody somegroup 0 May  1 22:30 apps
drwxrwxrwx 1 somebody somegroup 0 Mar 23 14:15 media
lr-xr-xr-x 1 somebody somegroup 0 Mar 23 14:36 pkgs -> 'E:\pkgs'
lr-xr-xr-x 1 somebody somegroup 0 May  1 23:21 scoop -> '.\apps\scoop'

# cd scoop && ls -l
lr-xr-xr-x 1 somebody somegroup 0 May  1 23:21 . -> '.\apps\scoop'

# ls
apps  buckets  modules  persist  scoop.db  shims  workspace

​Environment​​

OS infomation

版本 Windows 11 专业版
版本号 24H2
安装日期 ‎2025/‎2/‎16
操作系统版本 26100.3915
体验 Windows 功能体验包 1000.26100.83.0

ls version

ls 0.0.30

@zhw2101024
Copy link
Contributor

commit 2c130ae changed the behavior of -l option, though can't find why.

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

No branches or pull requests

3 participants