file-inst.xml 1.3 KB

12345678910111213141516171819202122232425262728
  1. <sect2>
  2. <title>Installation of File</title>
  3. <para>Install File by running the following commands:</para>
  4. <para><screen><userinput>cp readelf.h readelf.h.backup &amp;&amp;</userinput>
  5. <userinput>sed $'/#define __/a \\\n#include &lt;stdint.h&gt;' readelf.h.backup &gt; readelf.h &amp;&amp;</userinput>
  6. <userinput>./configure --prefix=/usr --datadir=/usr/share/misc &amp;&amp;</userinput>
  7. <userinput>make &amp;&amp;</userinput>
  8. <userinput>make install</userinput></screen></para>
  9. <para>File uses magic numbers to determine a file type. These magic numbers
  10. come with File in a plain text file. File internally compiles this database
  11. each time it is run. This is not the normal type of operation for File since
  12. compiling a
  13. plain text file each time is not the fastest way to do it. File offers an
  14. option "-C" to compile this magic number file. The reason this isn't done
  15. automatically is that some people like to work on the magic numbers. On the
  16. other hand many people didn't get it that they should compile the magic
  17. numbers, so the author of File added a warning when the plain text magic file
  18. is used. As we usually won't work on the plain text magic file, we
  19. compile this file, because it's faster, fixes that annoying warning and is how
  20. it was meant to be:</para>
  21. <para><screen><userinput>file -C</userinput></screen></para>
  22. </sect2>