The file command provides you useful information about any file.
For example, here is the output for a text file:
file license.txt
license.txt: ASCII English text, with CRLF line terminators
And here is one for a binary file. (The whoami util.)
file /usr/bin/whoami
/usr/bin/whoami: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
Lots of good information regarding the CPU architecture (Intel i386)
And here is the output using an image file:
file zenhub.png
zenhub.png: PNG image data, 900 x 699, 8-bit/color RGB, non-interlaced
file is truly a great utility and I can see myself using it quite a bit in the future. :)