file [options] files
-b Omit filenames (left column of output). -i Print MIME types for the file, such as "text/plain" or "audio/mpeg", instead of the usual output. -f name_file Read filenames, one per line, from the given name_file, and report their types. Afterward, process filenames on the command line as usual. -L Follow symbolic links, reporting the type of the destination file instead of the link. -z If a file is compressed, examine the uncompressed content to decide the file type, instead of reporting "compressed data."
⤍ file letter.txt letter.txt: ASCII text ⤍ file key.pem key.pem: PEM RSA private key ⤍ file /usr/bin/who /usr/bin/who: ELF 64-bit LSB pie executable, ... ⤍ file letter.txt key.pem letter.txt: ASCII text key.pem: PEM RSA private key
⤍ file -b letter.txt ASCII text ⤍ file -b letter.txt key.pem ASCII text PEM RSA private key