The file -b <path>
command seems useful for scripting (filtering file types, not necessarily by extension). But for that you have to know the actual string output for your target filetype(s)
If I want to match certain file types, but don't have all of them handy, is there a list of all the possible outputs?
I found docs for the magic file - using cat /usr/share/misc/magic.mgc | grep -a 'pattern'
sort of works, but it's awkward and you have to know exactly what you're looking for.
is there any documentation of the recognized file types somewhere?
Thanks!