Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Something odd I recently encountered, running file --mime-type on a collection of MP3 gets the mime-time wrong a third of the time:

$ for i in */*.mp3; do cat "$i"| file --mime-type -; done  | sort  | uniq -c
140 /dev/stdin: application/octet-stream
309 /dev/stdin: audio/mpeg

There doesn't seem to be any obvious reason, as even MP3s from the same source, will sometimes fail and sometimes not.

Bug, feature or anything obvious I am missing here?

share|improve this question
I think at least a part of the problem is with your command. I suggest using find. find . -name "*.mp3" -exec file --mime-type '{}' \; | sort | uniq -c – bodhi.zazen Apr 3 '12 at 22:12

If you noticed this after an update (which sometimes happens) or after an upgrade. This would be a regression, as such is a bug and needs to be reported.

Bug reports How do I submit a bug?

For reference check this posting which may be related:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.