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

Linux: cd and find commands fail when a colon is in the directory or file name #4889

Copy link
Copy link
@OOBF

Description

@OOBF
Issue body actions

The /sys and /proc directories have sub-directories with colons in the names. Commands like cd and find fail when trying to access directories with ':'.

PS /> cd /sys/devices/pci0000:00/
cd : Cannot find drive. A drive with the name 'sys/devices/pci0000' does not exist.
At line:1 char:1

  • cd /sys/devices/pci0000:00/
  •   + CategoryInfo          : ObjectNotFound: (sys/devices/pci0000:String) [Set-Location], DriveNotFoundException
      + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
    
    
    

PS /> find /sys -name ':'
Cannot find drive. A drive with the name '*' does not exist.
At line:1 char:1

  • find /sys -name ':'
  •   + CategoryInfo          : ObjectNotFound: (*:String) [], DriveNotFoundException
      + FullyQualifiedErrorId : DriveNotFound
    
    

The ls command does work.
PS /> ls /sys/devices/pci0000:00/
0000:00:00.0 0000:00:16.0 0000:00:19.0 0000:00:1b.0 0000:00:1c.1 0000:00:1c.3 0000:00:1d.0 0000:00:1f.2 firmware_node power uevent
0000:00:02.0 0000:00:16.3 0000:00:1a.0 0000:00:1c.0 0000:00:1c.2 0000:00:1c.5 0000:00:1f.0 0000:00:1f.3 pci_bus SMO8800:00


Expected behavior

For files and directories with ':' to be processed correctly, and not as drive names.

Actual behavior


Environment data

Name Value


PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.7
OS Linux 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-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

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.