Identify File Type
SH · File Contentsyntax
file [options] file...example
file mystery_attachment
file -i database.dumpoutput
mystery_attachment: PDF document, version 1.7
database.dump: application/octet-stream; charset=binaryNote file examines the file's content (magic bytes), not the extension. -i outputs MIME type. Useful when you receive a file with no extension or a misleading one.