Looking Inside Files
You've learned how to manipulate files and directories, so now it's time to find out what kind of information is contained within these files and look inside the files.
Task 7.1: Using file to Identify File Types
One of the most undervalued commands in UNIX is file, which is often neglected and collecting dust in some corner of the system. The file command is a program that can easily offer you a good hint as to the contents of a file by looking at the first few lines.
Unfortunately, there is a problem with the file command: It isn't 100% accurate. The program relies on a combination of the permissions of a file, the filename, ...