2013-02-07 69 views

回答

1

你的意思是哪里?它只是找到二进制文件,而wehereis试图找到源和手册页。

1

“哪里”似乎不是一个常见的Unix命令,我找不到任何手册页。

然而,"where" does exist in most Windows OSs.

在上述链接展望。

WHERE (Windows 2003 +) 

Locate and display files in a directory tree. 

The WHERE command is roughly equivalent to the UNIX 'which' command. 
By default, the search is done in the current directory and in the PATH. 

这是有道理的,因为该名男子页 “的” 状态:

WHICH(1) 

NAME 
    which - shows the full path of (shell) commands. 

你使用Cygwin?

我问,因为这将是最常见的情况,其中“哪些”和“哪里”将存在于同一个环境中。

在该环境中,“哪个”将以类似unix的方式显示命令所在的路径。

$ which where 
/cygdrive/c/Windows/system32/where 

和“where”将以类似窗口的方式显示路径。

$ where which 
C:\cygwin\bin\which.exe 
1

免责声明:这是使用Cygwin的Windows中。

Which显示一个可执行文件Where可显示多个的完整路径。

$which git sh

会产生像传递的第一个参数的/bin/git/相对路径,但是,

$where git sh

产生了通过即 注意到我在Windows中,所以我得到的所有参数的绝对路径东西的效果

C:\Program Files (x86)\Git\bin\git.exe 
C:\Program Files (x86)\Git\cmd\git.exe 
C:\Program Files (x86)\Git\bin\sh.exe

要添加到其他答案我认为只存在于Windows中。

+0

正在使用tcsh。 – jarCrack

相关问题