Background Back when I got my GL-AR150 mini router, I was blown away by the powerful capabilities of this $25 OpenWRT router,...
Recognize the format of any file using the file command!Stanislav Khromov
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. :)