source: general/sysutils/which.xml@ 1586494

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 1586494 was 1586494, checked in by Randy McMurchy <randy@…>, 19 years ago

Spelling, grammar, tag and excessive whitespace corrections to various package instructions

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

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