remove an old note for file
[linux_from_scratch.git] / BOOK / chapter08 / file.xml
blob326f99eeb99da8dcc6477b3d9d367301605ecc25
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-system-file" role="wrap">
9   <?dbhtml filename="file.html"?>
11   <sect1info condition="script">
12     <productname>file</productname>
13     <productnumber>&file-version;</productnumber>
14     <address>&file-url;</address>
15   </sect1info>
17   <title>File-&file-version;</title>
19   <indexterm zone="ch-system-file">
20     <primary sortas="a-File">File</primary>
21   </indexterm>
23   <sect2 role="package">
24     <title/>
26     <para>The File package contains a utility for determining the type of a given
27     file or files.</para>
29     <segmentedlist>
30       <segtitle>&buildtime;</segtitle>
31       <segtitle>&diskspace;</segtitle>
33       <seglistitem>
34         <seg>&file-fin-sbu;</seg>
35         <seg>&file-fin-du;</seg>
36       </seglistitem>
37     </segmentedlist>
39   </sect2>
41   <sect2 role="installation">
42     <title>Installation of File</title>
44     <para>Prepare File for compilation:</para>
46 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
48     <para>Compile the package:</para>
50 <screen><userinput remap="make">make</userinput></screen>
52     <para>To test the results, issue:</para>
54 <screen><userinput remap="test">make check</userinput></screen>
56     <para>Install the package:</para>
58 <screen><userinput remap="install">make install</userinput></screen>
60     <para><command>/bin/more</command> from util-linux will link to
61     <filename class="libraryfile">libmagic.so</filename>, so the shared
62     library should be moved to <filename class="directory">/lib</filename>,
63     and as a result the
64     <filename class="extension">.so</filename> file in
65     <filename class="directory">/usr/lib</filename> will need to be recreated:</para>
67 <screen><userinput remap="install">mv -v /usr/lib/libmagic.so.* /lib
68 ln -sfv ../../lib/$(readlink /usr/lib/libmagic.so) /usr/lib/libmagic.so</userinput></screen>
70   </sect2>
73   <sect2 id="contents-file" role="content">
74     <title>Contents of File</title>
76     <segmentedlist>
77       <segtitle>Installed programs</segtitle>
78       <segtitle>Installed library</segtitle>
80       <seglistitem>
81         <seg>file</seg>
82         <seg>libmagic.so</seg>
83       </seglistitem>
84     </segmentedlist>
86     <variablelist>
87       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
88       <?dbfo list-presentation="list"?>
89       <?dbhtml list-presentation="table"?>
91       <varlistentry id="file">
92         <term><command>file</command></term>
93         <listitem>
94           <para>Tries to classify each given file; it does this by performing
95           several tests&mdash;file system tests, magic number tests, and language
96           tests</para>
97           <indexterm zone="ch-system-file file">
98             <primary sortas="b-file">file</primary>
99           </indexterm>
100         </listitem>
101       </varlistentry>
103       <varlistentry id="libmagic">
104         <term><filename class="libraryfile">libmagic</filename></term>
105         <listitem>
106           <para>Contains routines for magic number recognition, used by the
107           <command>file</command> program</para>
108           <indexterm zone="ch-system-file libmagic">
109             <primary sortas="c-libmagic">libmagic</primary>
110           </indexterm>
111         </listitem>
112       </varlistentry>
114     </variablelist>
116   </sect2>
118 </sect1>