bpm-tools is a package for Linux which provides a useful program for identifying the beats-per-minute (BPM) of a song.
To install bpm-tools, run the following:
# apt-get install bpm-tools libsox-fmt-mp3
To analyse and tag all files in the current directory, run the following from the root of the directory:
find ./ -type f -print0 | xargs -0 -n1 -P4 bpm-tag
Replace P4 with the number of threads to run.