file - make a guess as to a file's type based on contents
file name ...
file a.out ar.h # Guess at types
File reads the first block of a file and tries to make an intelligent guess about what kind of file it is. It understands about archives, C source programs, executable binaries, shell scripts, and English text.