install (debian):

sudo aptitude install vorbis-tools

using:

cd /to/dir/with/flac/
find . -name '*.flac' -exec oggenc -q9 {} \;