user5198 user5198 - 2 months ago 11
Linux Question

find all audio files in a folder using bash in linux

When I am using wildcards with

command, it works.

$ ls '*.{mp3,ogg}' # Showing only two formats in the command
cannot access *.mp3: No such file or directory
1.ogg 2.ogg 3.ogg

but using find command doesn't work

$ find ~ -iname '*.{mp3,ogg}'

What is the error in the line?


I think this should work for you

   find ~ -name "*.mp3" -o -name "*.ogg"

-o is equivalent to boolean or