The unix file command uses a \"magic\" file database to determine which type of data a file contains, independently of the file\'s name or extension.
I
In this article: https://linux.die.net/man/1/file (or man file)
search for magic.mgc for explanation
The information identifying these files is read from the compiled magic file /usr/share/file/magic.mgc, or
/usr/share/file/magicif the compile file does not exist. In addition file will look in $HOME/.magic.mgc, or$HOME/.magicfor magic entries.