Unable to find /usr/share/file/magic

Howdy Folks :slight_smile: ,
I was going through the documentation for the ‘file’ command.
There it said that the ‘file’ command uses a magic file that contains patterns to recognize file types and that the ‘magic’ file is located under /usr/share/file/

I am using openSUSE 13.1 and am not able to find the file at the particular location. Can anybody help…

Regards

As this is about openSUSE 13.1, it shouldn’t be in the Pre-Release/Beta forum.

This will be moved to the Applications forum and is CLOSE for the moment.

Moved from Pre-Release/Beta and open again.

I do not know what you mean by “the documentation for the ‘file’ command”. but on my 13.1 system (as on all Unix/Linux systems) that is what I get with

man file

And it says (amongst many other things):

… The information identifying these files is read from the compiled magic file /usr/share/misc/magic.mgc, or the files in the directory /usr/share/misc/magic if the compiled file does not exist …

And indeed:

henk@boven:~> ls -l /usr/share/misc/
totaal 4432
-rw-r--r-- 1 root root  719112 19 nov 15:57 magic
-rw-r--r-- 1 root root 2785040 19 nov 15:57 magic.mgc
-rw-r--r-- 1 root root 1029548 27 sep 17:29 termcap
henk@boven:~>