mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-02 22:07:15 +08:00
change root.root to root:root and remove extra file
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
f8060f3e39
commit
b3795a3c6e
@ -25,7 +25,7 @@ doesn't spawn a shell.</para>
|
||||
type -p "$@"
|
||||
<userinput>EOF
|
||||
chmod 755 /usr/bin/which
|
||||
chown root.root /usr/bin/which</userinput></screen></para>
|
||||
chown root:root /usr/bin/which</userinput></screen></para>
|
||||
<para>This should generally work OK and is probably the easiest solution
|
||||
for boxes which don't need a good user environment to work in.</para>
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
<sect1 id="ch05-which">
|
||||
<?dbhtml filename="which.html" dir="chapter05"?>
|
||||
<title>The "which" program / script</title>
|
||||
|
||||
<para>The presence / absence of the which program in the main LFS book
|
||||
is probably one of the most contentious issues we have on the mailing
|
||||
lists. It has resulted in at least one flame war in the recent past.
|
||||
To hopefully put an end to this once and for all, we here present the
|
||||
various options for equipping your system with "which".</para>
|
||||
|
||||
<para>The first option is simply to use a bash alias:</para>
|
||||
<screen>alias which='type -p'</screen>
|
||||
<para>This command can be put in your
|
||||
<filename>~/.bash_profile</filename> or <filename>~/.bashrc</filename>
|
||||
file in order to be set up each time you log in (see man bash for more
|
||||
information on the bash login files). This will not always work
|
||||
however, for example it will fail when a program needs to use "which" but
|
||||
doesn't spawn a shell.</para>
|
||||
|
||||
<para>The second option is to create a simple script:</para>
|
||||
<para><screen><userinput>cat > /usr/bin/which << "EOF"</userinput>
|
||||
#!/bin/bash
|
||||
type -p "$@"
|
||||
<userinput>EOF
|
||||
chmod 755 /usr/bin/which
|
||||
chown root.root /usr/bin/which</userinput></screen></para>
|
||||
<para>This should generally work OK and is probably the easiest solution
|
||||
for boxes which don't need a good user environment to work in.</para>
|
||||
|
||||
<para>The third option is to install the actual program
|
||||
<emphasis>which</emphasis>.</para>
|
||||
|
||||
&which;
|
||||
|
||||
</sect1>
|
||||
|
Loading…
Reference in New Issue
Block a user