Linux file information FAQ: How can I tell what type of file a file is on a Unix or Linux system?
The Linux file command shows you the type of a file, or multiple files. It's usually used when you're about to look at some type of file you've never seen before. When I first started working with Unix and Linux systems I used it a lot to make sure I wasn't about to open a binary file in the vi editor, amongst other things.
You issue the Linux file command just like other commands, like this:
