Cygwin から Windows バイナリにアクセスするにはどうすればいいですか?

Cygwin から Windows バイナリにアクセスするにはどうすればいいですか?

道はC:\WINDOWS\System32\OpenSSH\ssh.exe

これはWindowsの実行ファイルです

C:\>dir C:\WINDOWS\System32\OpenSSH\ssh.exe

 Directory of C:\WINDOWS\System32\OpenSSH

01/01/2019  01:33 AM           891,337 ssh.exe
               1 File(s)        891,337 bytes

C:\>C:\WINDOWS\System32\OpenSSH\ssh.exe
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-E log_file] [-e escape_char]
           [-F configfile] [-I pkcs11] [-i identity_file]
           [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]
           [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]
           [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
           destination [command]

しかし、同じパスでは Cygwin ではアクセスできません。

[user@cygwin ~]$ ls -l "C:\WINDOWS\System32\OpenSSH\ssh.exe"
ls: cannot access C:\WINDOWS\System32\OpenSSH\ssh.exe: No such file or directory

アップデート1

[user@cygwin ~]$ ls -l "C:\WINDOWS\System32\ipconfig.exe"
-rwxr-xr-x 2 user mkpasswd 29184 Apr 12  2018 C:\WINDOWS\System32\ipconfig.exe
[user@cygwin ~]$

[user@cygwin ~]$ ls -l "C:\WINDOWS\System32\ipconfig"
-rwxr-xr-x 2 user mkpasswd 29184 Apr 12  2018 C:\WINDOWS\System32\ipconfig
[user@cygwin ~]$

[user@cygwin ~]$ ls -l /cygdrive/c/WINDOWS/System32/ipconfig
-rwxrwx---+ 2 TrustedInstaller TrustedInstaller 29184 Apr 12  2018 /cygdrive/c/WINDOWS/System32/ipconfig
[user@cygwin ~]$

[user@cygwin ~]$ ls -l /cygdrive/c/WINDOWS/System32/ipconfig.exe
-rwxrwx---+ 2 TrustedInstaller TrustedInstaller 29184 Apr 12  2018 /cygdrive/c/WINDOWS/System32/ipconfig.exe
[user@cygwin ~]$

私はWindows()とCygwin(/)形式の両方を使用してほとんどのWindowsバイナリにアクセスできましたが、C:\WINDOWS\System32\OpenSSH\ssh.exe

[user@cygwin ~]$ ls -l /cygdrive/c/WINDOWS/System32/OpenSSH/ssh.exe
ls: cannot access /cygdrive/c/WINDOWS/System32/OpenSSH/ssh.exe: No such file or directory
[user@cygwin ~]$

[user@cygwin ~]$ ls -l "C:\WINDOWS\System32\OpenSSH\ssh.exe"
ls: cannot access C:\WINDOWS\System32\OpenSSH\ssh.exe: No such file or directory
[user@cygwin ~]$

アップデート2

C:\>DIR /s/b C:\ssh.exe
C:\Windows\System32\OpenSSH\ssh.exe
C:\Windows\WinSxS\amd64_openssh-client-components-onecore_<RandomNumber1>_10.0.17134.1_none_<RandomNumber2>\ssh.exe

C:\>

答え1

バックスラッシュ(\)をスラッシュ(/)に変更し、ドライブ文字とコロン(:)を/cygdrive/小文字のプラスに置き換えます。ドライブ文字。 例えば:

/cygdrive/c/WINDOWS/System32/OpenSSH/ssh.exe

関連情報