¿Cuál es el equivalente de Windows del comando "which" en Unix? ¿Existe un comando de PowerShell equivalente?

Pregunta:

En Linux, tenemos el comando "which" para averiguar la ruta de un ejecutable.
¿Cuál es su equivalente de Windows? ¿Existe algún comando de PowerShell para hacer eso?

Respuesta:

Las versiones más nuevas de Windows (creo que Windows 2003 y versiones posteriores) tienen el comando where:

C:\>where ping
C:\Windows\System32\PING.EXE

Y para PowerShell, agregue explícitamente el sufijo .exe:

PS C:\>where.exe ping
C:\Windows\System32\PING.EXE

Leave a Comment

Your email address will not be published. Required fields are marked *

web tasarım