Using the file command

This tip demonstrates the use of the file command. This command has been in UNIX since at least 1973 but is often overlooked. However, it's an extremely useful command for classifying files.

The file command is provided by the package sys-apps/file, so if you don't already have it installed, you'll need to type emerge file. Chances are you've already got it on your system though. To use file simply type file filename and you'll see information about the filename you passed in. Simple right?