我需要澄清一下我们在终端下运行可执行文件的方式。这可能是一个蹩脚的问题,但是使用./an_executable和运行可执行文件有什么区别. an_executable(假设我们在 an_executable 所在的目录中)
./an_executable
. an_executable
我已经知道前者让 shell 在当前目录 ( .) 中查找 an_executable ,但是为什么在使用后一个版本/后不需要 a.呢?
.
/
提前致谢。
command-line executable
command-line ×1
executable ×1