简体   繁体   English

如何在系统中找到可执行文件的所有版本?

[英]How can I find all versions of an executable on my system?

I'm working with Eclipse and Subclipse and am trying to do some more advanced svn actions from the command line. 我正在使用Eclipse和Subclipse,并尝试从命令行执行一些更高级的svn操作。 But it appears that the command line and eclipse are using different svn clients. 但似乎命令行和eclipse正在使用不同的svn客户端。 How would I go about finding all the installed versions on my machine so I can find the path for the version I need? 我如何在我的机器上找到所有已安装的版本,以便找到我需要的版本的路径? Ie list svn which returns all the svn installations on the system. list svn ,它返回系统上的所有svn安装。 I'm positive I've seen a linux/unix function that does exactly that, but my google-fu is completely failing to turn up any results. 我很肯定我已经看到了一个linux / unix函数就是这样,但是我的google-fu完全没有找到任何结果。

You can use find: 你可以使用find:

find / -perm +111 -type f -name svn 2> /dev/null find / -perm +111 -type f -name svn 2> / dev / null

STDERR is piped to /dev/null to suppress "Permission denied" warnings. STDERR通过管道传递到/ dev / null以禁止“Permission denied”警告。

If you want to know the version of each: 如果你想知道每个版本:

find / -perm +111 -type f -name svn -print -exec {} --version -q \\; find / -perm +111 -type f -name svn -print -exec {} --version -q \\; 2> /dev/null 2> / dev / null

You're confused. 你很困惑。 Subclipse does not use the system copy of SVN -- it contains its own client (implemented in Java, I believe). Subclipse不使用SVN的系统副本 - 它包含自己的客户端(我相信用Java实现)。 There is likely not an equivalent command-line SVN client on your system at all. 您的系统上可能根本没有等效的命令行SVN客户端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM