Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

65 bytes removed, 03:10, 17 May 2021
no edit summary
# Issue the following Linux command to create a hard-linked file in your '''home''' directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">ln ~/links/data-file.txt ~/data-file.hard.lnk<br><br>
# Issue the following Linux command to compare all file's ''i-node'' numbers:<br><span style="color:blue;font-weight:bold;font-family:courier;">ls -li ~/links/data-file.txt ~/links/data-file.hard.lnk ~/data-file.hard.lnk</span><br><br>What do you notice about all of those file's ''i-node'' numbers?<br><br>
# Issue the following Linux command to check that you created those hard links: <br><span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul~uli101/myscripts/week8-check-1</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 to remove the '''~/links''' directory and its contents: <br><span style="color:blue;font-weight:bold;font-family:courier;">rm -rf ~/links</span><br><br>
# Issue a Linux command to confirm that the '''~/links''' directory has been removed.<br><br>
# Save your editing session and exit your text editor.<br><br>
# Issue the following Linux command to view the contents of the '''symbolic''' linked file:<br><span style="color:blue;font-weight:bold;font-family:courier;">cat ~/links2/text-file.sym.lnk</span><br><br>What did you notice? Again, when you view the contents of the symbolic-linked file,<br>you are redirected (via ''pathname'') to the <u>original</u> file.<br><br>
# Issue the following Linux command to check that you created those symbolic links: <br><span style="color:blue;font-weight:bold;font-family:courier;">bash /home/murray.saul/myscripts~uli101/week8-check-2</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 to remove the '''~/links2''' directory: <br><span style="color:blue;font-weight:bold;font-family:courier;">rm -rf ~/links2</span><br><br>
# Issue a Linux command to confirm that the '''~/links2''' directory has been removed.<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/myscripts~uli101/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>We will complete this investigation by learning to execute p'''reviously issued commands''' by using '''command history'''.<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>
# Type an exclamation mark '''!''' 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>
13,420
edits

Navigation menu