Changeset cbc6a3b


Ignore:
Timestamp:
05/07/2005 11:05:53 AM (17 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
10.0, 10.1, 11.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, ken/refactor-virt, krejzi/svn, lazarus, nosym, perl-modules, qt5new, systemd-11177, systemd-13485, trunk, xry111/git-date, xry111/git-date-for-trunk, xry111/git-date-test
Children:
d0006cd8
Parents:
c88ffaa
Message:

Tagged which.xml

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4007 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/sysutils/which.xml

    rc88ffaa rcbc6a3b  
    1414
    1515<sect1 id="which" xreflabel="which-&which-version;">
    16 <sect1info>
    17 <othername>$LastChangedBy$</othername>
    18 <date>$Date$</date>
    19 </sect1info>
    20 <?dbhtml filename="which.html"?>
    21 <title><application>which</application>-&which-version; and alternatives</title>
    22 <indexterm zone="which">
    23 <primary sortas="a-Which">Which</primary></indexterm>
     16  <?dbhtml filename="which.html"?>
    2417
    25 <para>The presence or absence of the <command>which</command> program in the
    26 main <acronym>LFS</acronym> book is probably one of the most contentious
    27 issues on the mailing lists. It has resulted in at least one flame war in the
    28 past. To hopefully put an end to this once and for all, presented here are two
    29 options for equipping your system with <command>which</command>. The question
    30 of which <quote><command>which</command></quote> is for you to decide.</para>
     18  <sect1info>
     19    <othername>$LastChangedBy$</othername>
     20    <date>$Date$</date>
     21  </sect1info>
    3122
    32 <para>The first option is to install the actual <acronym>GNU</acronym> program
    33 <emphasis>which</emphasis>.</para>
     23  <title>Which-&which-version; and Alternatives</title>
    3424
    35 <sect2>
    36 <title>Introduction to <application>which</application></title>
     25  <indexterm zone="which">
     26    <primary sortas="a-Which">Which</primary>
     27  </indexterm>
    3728
    38 <sect3><title>Package information</title>
    39 <itemizedlist spacing='compact'>
    40 <listitem><para>Download (HTTP): <ulink
    41 url="&which-download-http;"/></para></listitem>
    42 <listitem><para>Download (FTP): <ulink
    43 url="&which-download-ftp;"/></para></listitem>
    44 <listitem><para>Download MD5 sum: &which-md5sum;</para></listitem>
    45 <listitem><para>Download size: &which-size;</para></listitem>
    46 <listitem><para>Estimated disk space required:
    47 &which-buildsize;</para></listitem>
    48 <listitem><para>Estimated build time:
    49 &which-time;</para></listitem></itemizedlist>
    50 </sect3>
     29  <para>The presence or absence of the <command>which</command> program
     30  in the main LFS book is probably one of the most contentious issues on the
     31  mailing lists. It has resulted in at least one flame war in the past. To hopefully
     32  put an end to this once and for all, presented here are two options for equipping
     33  your system with <command>which</command>. The question of which
     34  <quote><command>which</command></quote> is for you to decide.</para>
    5135
    52 </sect2>
     36  <para>The first option is to install the actual GNU program
     37  <application>which</application>.</para>
    5338
    54 <sect2>
    55 <title>Installation of <application>which</application></title>
     39  <sect2 role="package">
     40    <title>Introduction to Which</title>
    5641
    57 <para>Install <application>which</application> by running the following
    58 commands:</para>
     42    <bridgehead renderas="sect3">Package Information</bridgehead>
     43    <itemizedlist spacing="compact">
     44      <listitem>
     45        <para>Download (HTTP): <ulink url="&which-download-http;"/></para>
     46      </listitem>
     47      <listitem>
     48        <para>Download (FTP): <ulink url="&which-download-ftp;"/></para>
     49      </listitem>
     50      <listitem>
     51        <para>Download MD5 sum: &which-md5sum;</para>
     52      </listitem>
     53      <listitem>
     54        <para>Download size: &which-size;</para>
     55      </listitem>
     56      <listitem>
     57        <para>Estimated disk space required: &which-buildsize;</para>
     58      </listitem>
     59      <listitem>
     60        <para>Estimated build time: &which-time;</para>
     61      </listitem>
     62    </itemizedlist>
    5963
    60 <screen><userinput><command>./configure --prefix=/usr &amp;&amp;
    61 make</command></userinput></screen>
     64  </sect2>
    6265
    63 <para>Now, as the root user:</para>
     66  <sect2 role="installation">
     67    <title>Installation of Which</title>
    6468
    65 <screen><userinput role='root'><command>make install</command></userinput></screen>
     69    <para>Install <application>which</application> by running the following
     70    commands:</para>
    6671
    67 </sect2>
     72<screen><userinput>./configure --prefix=/usr &amp;&amp;
     73make</userinput></screen>
    6874
    69 <sect2>
    70 <title>Contents</title>
     75    <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
    7176
    72 <segmentedlist>
    73 <segtitle>Installed Program</segtitle>
    74 <segtitle>Installed Libraries</segtitle>
    75 <segtitle>Installed Directories</segtitle>
     77<screen role="root"><userinput>make install</userinput></screen>
    7678
    77 <seglistitem>
    78 <seg>which</seg>
    79 <seg>None</seg>
    80 <seg>None</seg>
    81 </seglistitem>
    82 </segmentedlist>
     79  </sect2>
    8380
    84 <variablelist>
    85 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    86 <?dbfo list-presentation="list"?>
     81  <sect2 role="content">
     82    <title>Contents</title>
    8783
    88 <varlistentry id="which-prog">
    89 <term><command>which</command></term>
    90 <listitem><para>shows the full path of (shell) commands installed in your
    91 <envar>PATH</envar>.</para>
    92 <indexterm zone="which which-prog">
    93 <primary sortas="b-which">which</primary>
    94 </indexterm></listitem>
    95 </varlistentry>
    96 </variablelist>
     84    <segmentedlist>
     85      <segtitle>Installed Program</segtitle>
     86      <segtitle>Installed Libraries</segtitle>
     87      <segtitle>Installed Directories</segtitle>
    9788
    98 </sect2>
     89      <seglistitem>
     90        <seg>which</seg>
     91        <seg>None</seg>
     92        <seg>None</seg>
     93      </seglistitem>
     94    </segmentedlist>
    9995
    100 <sect2>
    101 <title>The 'which' script</title>
    102 <para>The second option (for those who don't want to install the program)
    103 is to create a simple script (execute as the root user):</para>
     96    <variablelist>
     97      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
     98      <?dbfo list-presentation="list"?>
     99      <?dbhtml list-presentation="table"?>
    104100
    105 <screen><userinput role='root'><command>cat &gt; /usr/bin/which &lt;&lt; "EOF"</command>
    106 #!/bin/bash
    107 type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}
    108 <command>EOF
    109 chmod 755 /usr/bin/which
    110 chown root:root /usr/bin/which</command></userinput></screen>
     101      <varlistentry id="which-prog">
     102        <term><command>which</command></term>
     103        <listitem>
     104          <para>shows the full path of (shell) commands installed in your
     105          <envar>PATH</envar>.</para>
     106          <indexterm zone="which which-prog">
     107            <primary sortas="b-which">which</primary>
     108          </indexterm>
     109        </listitem>
     110      </varlistentry>
    111111
    112 <para>This should work OK and is probably the easiest solution
    113 for most cases, but is not the most comprehensive implementation.</para>
    114 </sect2>
     112    </variablelist>
     113
     114  </sect2>
     115
     116  <sect2 role="installation">
     117    <title>The 'which' Script</title>
     118
     119    <para>The second option (for those who don't want to install the program)
     120    is to create a simple script (execute as the
     121    <systemitem class="username">root</systemitem> user):</para>
     122
     123<screen role="root"><userinput>cat &gt; /usr/bin/which &lt;&lt; "EOF"
     124<literal>#!/bin/bash
     125type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}</literal>
     126EOF
     127chmod -v 755 /usr/bin/which
     128chown -v root:root /usr/bin/which</userinput></screen>
     129
     130    <para>This should work OK and is probably the easiest solution
     131    for most cases, but is not the most comprehensive implementation.</para>
     132
     133  </sect2>
    115134
    116135</sect1>
Note: See TracChangeset for help on using the changeset viewer.