file-inst.xml 1.4 KB

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