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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.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 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 82bc335 was 52d29f7, checked in by Bruce Dubbs <bdubbs@…>, 20 years ago

XML Updates to Part III from DJ

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

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[52d29f7]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/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 <!ENTITY which-download-ftp "ftp://ftp.gnu.org/gnu/which/which-&which-version;.tar.gz">
9 <!ENTITY which-size "123 KB">
10 <!ENTITY which-buildsize "940 KB">
11 <!ENTITY which-time "0.03 SBU">
12]>
13
[f45b1953]14<sect1 id="which" xreflabel="which-&which-version;">
[7f72cbf]15<?dbhtml filename="which.html"?>
[ca3bcd40]16<title>which-&which-version; and alternatives</title>
[f45b1953]17
[70b65ddf]18<para>The presence or absence of the which program in the main <acronym>LFS
[110ec35a]19</acronym> book is probably one of the most contentious issues we have on the
[70b65ddf]20mailing lists. It has resulted in at least one flame war in the past.
[85ef7049]21To hopefully put an end to this once and for all, we here present two of
[2ab68bb]22the options for equipping your system with "which". The question of which "which"
23is for you to decide.</para>
[f45b1953]24
[46bca118]25<para>The first option is to install the actual <acronym>GNU</acronym> program
[85ef7049]26<emphasis>which</emphasis>.</para>
27
[52d29f7]28<sect2>
29<title>Introduction to <application>which</application></title>
30
31<sect3><title>Package information</title>
32<itemizedlist spacing='compact'>
33<listitem><para>Download (HTTP): <ulink
34url="&which-download-http;"/></para></listitem>
35<listitem><para>Download (FTP): <ulink
36url="&which-download-ftp;"/></para></listitem>
37<listitem><para>Download size: &which-size;</para></listitem>
38<listitem><para>Estimated Disk space required:
39&which-buildsize;</para></listitem>
40<listitem><para>Estimated build time:
41&which-time;</para></listitem></itemizedlist>
42</sect3>
43
44
45</sect2>
46
47<sect2>
48<title>Installation of <application>which</application></title>
49
50<para>Install <application>which</application> by running the following
51commands:</para>
52
53<screen><userinput><command>./configure --prefix=/usr &amp;&amp;
54make &amp;&amp;
55make install</command></userinput></screen>
56
57</sect2>
58
59
60<sect2>
61<title>Contents</title>
62
63<para>The <application>which</application> package contains <command>which</command>.</para>
64
65</sect2>
66
67<sect2><title>Description</title>
68
69<sect3><title>which</title>
70<para><command>which</command> shows the full path of (shell) commands.</para>
71</sect3>
72
73</sect2>
[f45b1953]74
[52d29f7]75<sect2>
76<title>The 'which' script</title>
[85ef7049]77<para>The second option (for those who don't want to install the program)
78is to create a simple script:</para>
[110ec35a]79<screen><userinput><command>cat &gt; /usr/bin/which &lt;&lt; "EOF"</command>
[f45b1953]80#!/bin/bash
[2687739]81type -pa "$@" | head -n 1 ; exit ${PIPESTATUS[0]}
[110ec35a]82<command>EOF
[f45b1953]83chmod 755 /usr/bin/which
[110ec35a]84chown root:root /usr/bin/which</command></userinput></screen>
[70b65ddf]85<para>This should work OK and is probably the easiest solution
86for most cases, but is not the most comprehensive implementation.</para>
[85ef7049]87</sect2>
[f45b1953]88
89</sect1>
90
Note: See TracBrowser for help on using the repository browser.