How search for all music files?

Is there way to search for all Music File scattered all over /home/user using whatever Music Player I have installed? Yes this means all all File Formats and Codecs that playback music.

Thank you.


GUI / file browser?


From within a music player? Which one? (There’s many.)

When the music player asks you to set the location for music library or whatever it wants to call it, just set it to be your home folder. This might not work for all music players but it should for some.

# Show available formats
ffmpeg -formats

# Show all codecs known to libavcodec
ffmpeg -codecs

# Show information from multimedia streams and prints it in human- and machine-readable fashion
ffprobe <MediaFile>

# Show meta information
exiftool <MediaFile>

# Find files with names ending in .wav,r .mp3, or ogg.
# Could also use `locate` (mlocate pkg; requires to run updatedb manually or systemd updatedb.timer).
# `find` transverses the live FS, where locate searches a database that is updated via `updatedb`.
find $HOME -type f \( -iname '*.wav' -o -iname '*.mp3' -o -iname '*.ogg' \) -a -print

locate -i  $HOME'*.wav' $HOME'*.mp3'  $HOME'*.ogg'

The file command can be used to assist in determining the file type. Same with the commands mimetype and xdg-mime. You could use locate or find all files in your home directory and check them (exec or xargs) using one of these commands (file, mimetype, xdg-mime) .

# file mimetype
xdg-mime query filetype <File>

# default application
# use command substitution $() or take the ouput of the above and replace $(contents)
xdg_mime query default  $( xdg_mime query filetype <File> )

# this is suppose to provide a list of qualifying applications. it can serve as a starting point.
mimeopen -d <MediaFile>

To find media capable gui’s, either (I’m using XFCE, so this may vary)

  • check your desktop’s menu under Media
  • check your desktop’s settings for mimetype or default applications.
  • type xdg-mime query default audio/mp3
  • type grep 'audio/mpeg' /usr/share/applications/mimeinfo.cache # replace audio/mpeg as needed

To find media capable programs, beside the above, I normally use man -k audio. The short description would be searched for “audio”. Archlinux has a list of multimedia application.