Today I Learned - Rocky Kev

TIL Find Command

POSTED ON:

TAGS:

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:

TIL using the find command

find [path] -user [username] [options]

TIL Find Command

I wanted to look for files with a specific extension. You can do that with ls *.(mp3|exe|mp4)

TIL obscure search engines

We all know the big ones like Google and Bing that have massive Indexes. THen we know about Wolfram Alpha and DuckDuckGo. But have you heard of Thunderstone?