source: general/sysutils/which.xml@ 82bdecf

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.0 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 82bdecf was 82bdecf, checked in by Bruce Dubbs <bdubbs@…>, 5 years ago

Tag Xorg and it's dependencies.
Some misc text tweaks.

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

  • Property mode set to 100644
File size: 4.5 KB
Line 
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
7<!-- <!ENTITY which-download-http "http://www.xs4all.nl/~carlo17/which/which-&which-version;.tar.gz">-->
8
9 <!ENTITY which-download-http "&gnu-http;/which/which-&which-version;.tar.gz">
10 <!ENTITY which-download-ftp "&gnu-ftp;/which/which-&which-version;.tar.gz">
11 <!ENTITY which-md5sum "097ff1a324ae02e0a3b0369f07a7544a">
12 <!ENTITY which-size "148 KB">
13 <!ENTITY which-buildsize "1 MB">
14 <!ENTITY which-time "less than 0.1 SBU">
15]>
16
17<sect1 id="which" xreflabel="Which-&which-version;">
18 <?dbhtml filename="which.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>Which-&which-version; and Alternatives</title>
26
27 <para>
28 The presence or absence of the <command>which</command> program in the
29 main LFS book is probably one of the most contentious issues on the
30 mailing lists. It has resulted in at least one flame war in the past. To
31 hopefully put an end to this once and for all, presented here are two
32 options for equipping your system with <command>which</command>. The
33 question of which <quote><command>which</command></quote> is for you to
34 decide.
35 </para>
36
37 <indexterm zone="which">
38 <primary sortas="a-Which">Which</primary>
39 </indexterm>
40
41 <sect2 role="package">
42 <title>Introduction to GNU Which</title>
43
44 <para>
45 The first option is to install the actual GNU
46 <application>which</application> package.
47 </para>
48
49 &lfs90_checked;
50
51 <bridgehead renderas="sect3">Package Information</bridgehead>
52 <itemizedlist spacing="compact">
53 <listitem>
54 <para>Download (HTTP): <ulink url="&which-download-http;"/></para>
55 </listitem>
56 <listitem>
57 <para>Download (FTP): <ulink url="&which-download-ftp;"/></para>
58 </listitem>
59 <listitem>
60 <para>Download MD5 sum: &which-md5sum;</para>
61 </listitem>
62 <listitem>
63 <para>Download size: &which-size;</para>
64 </listitem>
65 <listitem>
66 <para>Estimated disk space required: &which-buildsize;</para>
67 </listitem>
68 <listitem>
69 <para>Estimated build time: &which-time;</para>
70 </listitem>
71 </itemizedlist>
72
73 <para condition="html" role="usernotes">User Notes:
74 <ulink url="&blfs-wiki;/which"/></para>
75
76 </sect2>
77
78 <sect2 role="installation">
79 <title>Installation of Which</title>
80
81 <para>Install <application>which</application> by running the following
82 commands:</para>
83
84<screen><userinput>./configure --prefix=/usr &amp;&amp;
85make</userinput></screen>
86
87 <para>This package does not come with a test suite.</para>
88
89 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
90
91<screen role="root"><userinput>make install</userinput></screen>
92
93 </sect2>
94
95 <sect2 role="content">
96 <title>Contents</title>
97
98 <segmentedlist>
99 <segtitle>Installed Program</segtitle>
100 <segtitle>Installed Libraries</segtitle>
101 <segtitle>Installed Directories</segtitle>
102
103 <seglistitem>
104 <seg>which</seg>
105 <seg>None</seg>
106 <seg>None</seg>
107 </seglistitem>
108 </segmentedlist>
109
110 <variablelist>
111 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
112 <?dbfo list-presentation="list"?>
113 <?dbhtml list-presentation="table"?>
114
115 <varlistentry id="which-prog">
116 <term><command>which</command></term>
117 <listitem>
118 <para>shows the full path of (shell) commands installed in your
119 <envar>PATH</envar>.</para>
120 <indexterm zone="which which-prog">
121 <primary sortas="b-which">which</primary>
122 </indexterm>
123 </listitem>
124 </varlistentry>
125
126 </variablelist>
127
128 </sect2>
129
130 <sect2 role="installation">
131 <title>The 'which' Script</title>
132
133 <para>The second option (for those who don't want to install the package)
134 is to create a simple script (execute as the
135 <systemitem class="username">root</systemitem> user):</para>
136
137<screen role="root"><userinput>cat &gt; /usr/bin/which &lt;&lt; "EOF"
138<literal>#!/bin/bash
139type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}</literal>
140EOF
141chmod -v 755 /usr/bin/which
142chown -v root:root /usr/bin/which</userinput></screen>
143
144 <para>This should work OK and is probably the easiest solution
145 for most cases, but is not the most comprehensive implementation.</para>
146
147 </sect2>
148
149</sect1>
Note: See TracBrowser for help on using the repository browser.