TIL Find Command
POSTED ON:
TAGS: search terminal commands
I wanted to look for files with a specific extension.
## top answer
ls *.{mp3,exe,mp4} ## will throw a error if any of them don't have a result
ls *.(mp3|exe|mp4) ## Return all files that match, even if there's 0 results
## alternate
ls *.mp4 *.mp3 *.exe
The *
means any
Then the brackets of elements
Via https://stackoverflow.com/a/1447974/4096078
Related TILs
Tagged: search