Linux “Find” command is one of my tools when administering Linux Servers. I came into situation where I need to find multiple file with different extensions at once. I have tried the regex options but can’t seem to make work. But after googling a bit I have managed to find what I was looking for using the “-o” which means or(somehow equivalent to boolean “or”).
The command below would list all files that are in wav and fbs formats:
find . -name '*.wav' -o -name '*.fbs'
When I was reviewing, I find it more readable when Find‘s output is piped into grep command. Something like this would still show the same result but the command itself is more cleaner for me.
find . -type f | egrep '\.(wav|fbs)$'