Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

150 bytes added, 17:52, 25 February 2021
INVESTIGATION 3: ALIASES / COMMAND HISTORY
# Issue the following alias: <span style="color:blue;font-family:courier;font-weight:bold">lh</span> <br><br>What do you think this command does?<br><br>
# '''Logout''' of your Matrix account, than log into your Matrix account.<br><br>
# Reissue the '''lal''' alias. What happened?<br><br>
# Reissue the '''lh''' alias. What happened?<br><br>
# Issue the '''alias | grep lh''' command without any arguments to see if it is stored in memory.<br><br>
# Run the '''lh''' alias to confirm that it is properly set in memory.<br><br>
# Issue the following Linux command to edit your ~/.bashrc startup file:<br><span style="color:blue;font-family:courier;font-weight:bold">nano ~/.bashrc</span><br><br>
# Add the following line at the '''bottom ''' of this file:<br><span style="font-family:courier;font-weight:bold;>alias lh='ls --human-readable --size -1 -S --classify'</span><br><br>
# Save your editing changes and exit your text editor.<br><br>
# '''Logout''' of your Matrix account, than log into then '''login''' to your Matrix account.<br><br>
# Reissue the '''lh''' alias. What happened?<br><br>
# Issue the following Linux command: <span style="font-family:courier;font-weight:bold;>unalias lh</span><br><br>
# Run the '''lh''' alias to see what happens.<br><br>What happenned?<br><br>
# '''Logout ''' of your Matrix account, than log into then '''login''' to your Matrix account.<br><br># Reissue the '''lh''' alias. What happened? Why?<br><br># Reissue the '''lal''' alias. Why '''didn't''' this alias work?<br><br>The checking script below is designed to act as a '''filter''' with a '''pipeline command'''.<br>This will allow to check if your '''lh''' alias exists when it is checked in this program.<br><br>
# Issue the following Linux pipeline command:<br><span style="color:blue;font-weight:bold;font-family:courier;">alias | bash /home/murray.saul/scripts/week8-check-3</span><br><br>If you encounter errors, then view the feedback to make corrections, and then re-run the checking script.<br>If you receive a congratulation message that there are no errors, then proceed with this tutorial.<br><br>
# Issue the following Linux command: <span style="color:blue;font-family:courier;font-weight:bold">history | grep "lh"</span><br><br>What do you notice?<br><br>
# Press Type an exclamation mark '''! immediately ''' followed by the number by one of those commands<br>listed in the '''history list ''' and press <span style="color:blue;font-family:courier;font-weight:bold">ENTER</span><br><br>What happened?<br><br>
# Type the following: <span style="color:blue;font-family:courier;font-weight:bold">!unalias</span> and press <span style="color:blue;font-family:courier;font-weight:bold">ENTER</span><br><br>What happened?<br><br>
# Issue the following Linux command: <span style="color:blue;font-family:courier;font-weight:bold">history | grep "lh"</span><br><br>What happened?<br><br>
13,420
edits

Navigation menu