Linux file command
file command is used to determine the file type. It does not care about the extension used for file. It simply uses file command and tell us the file type. It has several options.
In above snapshot, you can see file command along with different arguments, specifying their file types.
Note: File command tell us the file type with the help of a magic file that contains all the patterns to recognize a file type. Path of magic file is /usr/share/file/magic. For more information enter the command 'man 5 magic'.
Linux File Command Options