Videos
They're [probably] all the same (gold has an extra version -- see the end of this post).
But consider the rest of this answer code-golf for the best way to extract the versions.
dpkg -L binutils | grep "/usr/bin/" | xargs -i sh -c "{} --version"
Does pretty much what roadmr's does.
dpkg -L binutils | xargs -i sh -c "{} --version 2>/dev/null || exit 0"
Tries to run everything dpkg -L ... outputs. Obviously only the executables will run so we just need to redirect error (and make xargs ignore them).
dpkg -L binutils | xargs -i bash -c '[[ -x "{}" && -f "{}" ]] && {} --version'
Test that we're dealing with an executable file rather than filtering path.
sudo apt-get install parallel
dpkg -L binutils | grep /usr/bin/ | parallel {} --version
dpkg -L binutils | parallel {} --version 2>/dev/null
dpkg -L binutils | parallel '[[ -x "{}" && -f "{}" ]] && {} --version'
This time we use GNU parallel to do the same approaches. parallel lets us skip over certain inconveniences in xargs (like it not being able to skip over any non-zero exit code. man parallel is a genuinely good read.
With all that said, while shorter, all my examples fork out into a new shell (unavoidable with xargs, and sort of the point of parallel) so they're all somewhat slower than roadmr's. The first is the quickest.
Edit: Until now...
sh <(dpkg -L binutils | awk '/bin\// {print $0 " --version"}')
Only two forks (sort of) and it's as fast as the for loop (while much shorter).
Edit: They're actually not quite the same. gold has a secondary version (1.11) which the other commands don't.
$ sh <(dpkg -L binutils | awk '/bin\// {print $0 " --version"}') | \
grep Binutils | sort -u | column -t
GNU addr2line (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU ar (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU assembler (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU c++filt (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU dwp (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU elfedit (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU gold (GNU Binutils for Ubuntu 2.23.52.20130913) 1.11
GNU gprof (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU ld (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU nm (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU objcopy (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU objdump (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU ranlib (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU readelf (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU size (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU strings (GNU Binutils for Ubuntu) 2.23.52.20130913
GNU strip (GNU Binutils for Ubuntu) 2.23.52.20130913
Try this:
for util in `dpkg --listfiles binutils |grep "\/usr\/bin\/"`; do
echo -n "$util -> "; echo "" | $util --version
done
This gets all the binaries in the binutils packages and queries each one with its --version parameter. I echo an empty string for those that expect input in the terminal.
Install the following packages via apt-get or Synaptic:
- gcc
- binutils
- make
- linux-source
The last package always contains the sources for the newest kernel. If you are running an older kernel, you should get the sources for that, e.g. linux-source-3.0.0 . If you don't know, which kernel you are running, type uname -a in a terminal.
Install GCC (GNU Compiler Collection) (which also installs binutils and make)
# apt-get update && apt-get upgrade
# apt-get install build-essential
Install Kernel Source
# apt-get install linux-headers-$(uname -r)
After this you will be all set to install the VMWare tools.
Yes, with ld -v you can view the version of binutils (in your case is 2.24)
I tested it only with the Debian 8, but I think it must be working with other Debian-based operation systems (Ubuntu, Mint, other).
dpkg -l | grep binutils
$ dpkg -l | grep binutils
ii binutils 2.25-5+deb8u1 amd64 GNU assembler, linker and binary utilities
apt-cache policy binutils
$ apt-cache policy binutils
binutils:
Installed: 2.25-5+deb8u1
Candidate: 2.25-5+deb8u1
Version table:
*** 2.25-5+deb8u1 0
500 http://ftp.ru.debian.org/debian/ jessie-proposed-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.25-5 0
500 http://ftp.ru.debian.org/debian/ jessie/main amd64 Packages
500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
apt-cache show binutils (stripped)
$ apt-cache show binutils
Package: binutils
Version: 2.25-5+deb8u1
Installed-Size: 20566
Maintainer: Matthias Klose <doko@debian.org>
Architecture: amd64
Replaces: binutils-gold (<< 2.20.51.20100415), binutils-mingw-w64-i686 (<< 2.23.52.20130612-1+3), binutils-mingw-w64-x86-64 (<< 2.23.52.20130612-1+3)
Provides: binutils-gold, elf-binutils
Depends: libc6 (>= 2.14), zlib1g (>= 1:1.2.0)
Suggests: binutils-doc (>= 2.25-5+deb8u1)
..............................
ld --version
$ ld --version
GNU ld (GNU Binutils for Debian) 2.25
ar --version
$ ar --version
GNU ar (GNU Binutils for Debian) 2.25