linux - 终端 Mac 操作系统 : How to know the executed command?

标签 linux macos terminal

我正在尝试安装 PyQT,安装时显示我应该执行以下操作:

python configure.py Querying qmake about your Qt installation... Error: PyQt5 requires Qt v5.0 or later. You seem to be using v4.8.6. Use the --qmake flag to specify the correct version of quake.

>> qmake -v
QMake version 2.01a
Using Qt version 4.8.6 in /usr/local/Cellar/qt/4.8.6/lib

所以我发现 qmake 不是正确的版本。但我问另一个问题:我怎么知道执行器“qmake”在哪里???更多全局信息:当我们键入终端 cmd 时,如何知道运行哪个可执行文件?

谢谢 罗曼。

最佳答案

使用类型。在简单的情况下,这看起来很像 which:

$ type make
make is /usr/bin/make
$ which make
/usr/bin/make

但是,请考虑:

$ type [
[ is a shell builtin
$ which [
/bin/[

在这种情况下, type 正确地告诉您 [ -f 。 ] 使用 shell 中内置的 [ 实现,而 which 错误地告诉您使用了 /bin/[ 中的可执行文件。

别名、shell 函数等也是如此:which 只告诉您有关可执行文件的信息,但 type 告诉您正在运行的内容,无论它是否是可执行文件。

关于linux - 终端 Mac 操作系统 : How to know the executed command?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25554451/

相关文章:

iphone - OS X/iOS - 使用 AudioConverterFillComplexBuffer 进行缓冲区的采样率转换

Linux emacs/纳米 : how to select all text lines in a larger file and copy

linux - 如何将 'stdout' 重定向到 'stderr' 并将 'stderr' 重定向到 'stdout'?

ruby - Ruby 中的终端颜色

linux - 堆栈粉碎代码在 Linux 内核 2.6.38.7 上不起作用...请帮忙

c - 共享库和 rpath

linux - 从 bash 脚本文件读取 csv 文件

linux - Linux内核中的IS_ALIGNED宏是做什么的?

macos - 使用 homebrew 安装 PostgreSQL 的错误

macos - 当我找到 `brew update` `https://github.com/Homebrew/homebrew-dupes/` not found