I thought I understood this, but I'm getting unexplained behavior. I have these files:
$ which -a kvm | xargs ls -l
lrwxrwxrwx 1 root root 18 2011-11-17 17:14 /usr/bin/kvm -> qemu-system-x86_64
lrwxrwxrwx 1 root root 18 2011-11-17 17:21 /usr/local/bin/kvm -> qemu-system-x86_64
$ which -a qemu-system-x86_64 | xargs ls -l
-rwxr-xr-x 1 root root 2535168 2011-10-04 02:44 /usr/bin/qemu-system-x86_64
-rwxr-xr-x 1 root root 3497304 2011-11-17 16:26 /usr/local/bin/qemu-system-x86_64
And they are different versions:
$ /usr/bin/kvm --version
QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3), Copyright (c) 2003-2008 Fabrice Bellard
$ /usr/local/bin/kvm --version
QEMU emulator version 0.15.92 (qemu-kvm-devel), Copyright (c) 2003-2008 Fabrice Bellard
My path has /usr/local/bin first, and when I do which I see that one. So I'd expect it to win. But instead the older version wins:
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin
$ which kvm
/usr/local/bin/kvm
$ kvm --version
QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3), Copyright (c) 2003-2008 Fabrice Bellard
Why does kvm --version give me 0.12 instead of 0.15???
