Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

86 bytes removed, 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 '''FYI:lal''' In order to PROPERLY run the following checking script, we need to run it via the "dot" (alias.) command. This is done by typing a period, followed by a space, and then followed by the checking scriptWhy '''didn't'''s pathname. By running the "dot" command, aliases that were set in your current session are recognized within the running script for checking purposes.this alias work?<br><br># Issue the following Linux command The checking script below is designed to check your work ("act as a '''.filter'''" as the with a '''pipeline command''' and pathname as the .<br>This will allow to check if your '''argumentlh''')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