Determining file types on Linux and macOS

Have you ever downloaded a file that didn’t have an extension? (I have…) But here’s a new tool for your toolkit. The file command tries to guess what kind of file you pass to it using some signature features of common file types. Check the man page (man file) in your friendly local terminal emulator for more.

This post was originally posted on 2013-03-28 and last updated 2019-09-26.