Please let me know if below two statements are correct or not:Folder /usr/share/mime/magic has a database/table that will give me what are the current possible file formats (outputs that I can get when I type the file command and follow it by a file name). Whenever the file command output contains the word text it refers to something that you can read with a text viewer, and anything without text is some kind of binary.
File command database and identifying text files
file format;file command
Folder /usr/share/mime/magic has a database/table that will give me what are the current possible file formats (outputs that I can get when I type file command and follow it by a file).Correct except that /usr/share/mime/magic is not the directory that file uses: this file is only used for the MIME type database.From file's manpage: The information identifying these files is read rom the compiled magic file /usr/share/file/misc/magic.mgc, or the files in the directory /usr/share/file/misc/magic if the compiled file does not exist.And in fact, in my Arch Linux system, that file belongs to the file package.Whenever file command output contains the word text it refers to something that you can read with a text viewer, and anything without text is some kind of binary.Looks correct (I tried to find a counterexample but was unable to).