The path to the Find command in Windows (similar to the which command in Linux)

Source: Internet
Author: User

Where is a direct equivalent:

C:\users\joey>where cmd
C:\Windows\System32\cmd.exe
Note that in PowerShell where itself are an alias for Where-object, thus you need to Usewhere.exe in PowerShell.

In the cmd you can also use for:

C:\users\joey>for%x in (powershell.exe) do @echo%~ $PATH: X
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
In PowerShell you has Get-command and its alias GCM which does the same if you pass a argument (but also works for alias ES, cmdlets and Functions in PowerShell):

PS c:\users\joey> Get-command where

CommandType Name Definition
----------- ---- ----------
Alias where Where-object
Application Where.exe C:\Windows\system32\where.exe
The first returned command is the one, the would be executed.

The path to the Find command in Windows (similar to the which command in Linux)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.