File names in UNIX can be entirely independent of the file types. Thus, it’s tricky to determine the actual information.  Executing the file command reveals what format a file uses and examines each argument by conducting three tests – filesystem, magic, and language tests. The first that succeeds will output the file type.