如何获取我所使用命令的完整路径?
比如,我已经安装了jdk到/opt/Oracle/jdk1.7.0_25
,而我的PATH
看起来是这样的:
/opt/Oracle/jdk1.7.0_25/bin/:/usr/lib/x86_64-linux-gnu/qt4/bin:/home/unimous/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games.
我想从java
中获取/opt/Oracle/jdk1.7.0_25/bin/java
。