Don't stop at first file type match; keep going until the end of the file

file

file -k {{filename}}

click the source code to copy install file on any operating system with command-not-found.com