Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Get-ChildItem doesn't treat directory symlinks as directories on Unix #3723

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Note: Applies to Linux and macOS, not Windows.

In most contexts, a symlink to a directory should be treated as a directory.

Get-ChildItem on Unix platform currently treats directory symlinks as files, and therefore doesn't show their contents.

Steps to reproduce (run on a Unix platform)

# Create symlink 'tmpl' to directory '/tmp' in the current dir.
ln -s /tmp tmpl
# Pass the directory symlink to Get-ChildItem
Get-ChildItem tmpl 

Expected behavior

A listing of the contents of directory /tmp

Actual behavior

Something like the following is output; i.e., information about the symlink itself, not its target's contents:

    Directory: /Users/jdoe


Mode                LastWriteTime         Length Name                                                                                                                              
----                -------------         ------ ----                                                                                                                              
d----l           5/7/17   2:35 PM                tmpl                                                                                                                              

Environment data

PowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on macOS 10.12.4
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-DuplicateThe issue is a duplicate.The issue is a duplicate.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.