Equivalent of which in Windows, where is a command stored?

The which command will give the location of a command in Linux. For example-

 $ which date
 /bin/date

In Windows, we have the where command which is available from Windows 2003 onwards. For example-

C:\Users\Administrator>where cmd
C:\Windows\System32\cmd.exe

If you run it in a Powershell, use where.exe because where is an alias for Where-Object.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s