Skip to content
Snippets Groups Projects
Commit 94797ea4 authored by Goik Martin's avatar Goik Martin
Browse files

Two new exercises mlocate / tail

parent 0a7debde
No related branches found
No related tags found
No related merge requests found
......@@ -272,8 +272,8 @@ chmod go-r id_rsa <co linkends="sdi_fig_sshPermissions-7"
<callout arearefs="sdi_fig_sshPermissions-6-co"
xml:id="sdi_fig_sshPermissions-6">
<para>Configuration files do not necessitate execution privileges.
</para>
<para>Configuration files do not necessitate execution
privileges.</para>
</callout>
<callout arearefs="sdi_fig_sshPermissions-7-co"
......@@ -306,5 +306,86 @@ drwxr-xr-x+ 30 goik fb1prof 0 Oct 13 16:04 ..
<screen>~&gt; ssh localhost
Welcome to Ubuntu 18.04.3 LTS ...</screen>
</figure>
<qandaset defaultlabel="qanda" xml:id="unixintro_qanda_mlocate">
<title>Enabling index based file search</title>
<qandadiv>
<qandaentry>
<question>
<itemizedlist>
<listitem>
<para>Install the <productname>mlocate</productname>
package.</para>
</listitem>
<listitem>
<para>Index your current file system using the
<command>updatedb</command> command</para>
</listitem>
<listitem>
<para>Use the <command>locate</command>
<option>aptitude</option> command to search for filenames
containing the string »<code>aptitude</code>«.</para>
</listitem>
<listitem>
<para>Create a new file
<filename>mylocaltest.txt</filename>.</para>
</listitem>
<listitem>
<para>Use <command>locate</command>
<option>localtest</option>. What do you observe?</para>
</listitem>
<listitem>
<para>Rebuild the index again.</para>
</listitem>
<listitem>
<para>Use <command>locate</command> again searching for files
containing the »<code>localtest</code>« string again.</para>
</listitem>
</itemizedlist>
</question>
<answer>
<para>The first <command>locate</command>
<option>localtest</option> call fails since the
<filename>mylocaltest.txt</filename> file is not part of the index
yet. After rebuilding it will be found.</para>
</answer>
</qandaentry>
</qandadiv>
</qandaset>
<qandaset defaultlabel="qanda" xml:id="unixintro_qanda_tail">
<title>Using the <command>tail</command> <option>-f</option>
command</title>
<qandadiv>
<qandaentry>
<question>
<itemizedlist>
<listitem>
<para>Login to your VM</para>
</listitem>
<listitem>
<para>Issue <command>tail</command> <option>-f</option>
<option>/var/log/auth.log</option>.</para>
</listitem>
<listitem>
<para>Ask your partner to log into the same VM and watch for
incoming changes.</para>
</listitem>
</itemizedlist>
</question>
</qandaentry>
</qandadiv>
</qandaset>
</section>
</chapter>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment