Changes

Jump to: navigation, search

Tutorial8: Links / Process Management

854 bytes added, 09:33, 25 February 2021
INVESTIGATION 1: LINKING FILES
# Issue the following Linux command to create the following symbolic link in your '''home''' directory: <br><span style="color:blue;font-weight:bold;font-family:courier;">ln -s ~/links2/text-file.txt ~/text-file.sym.lnk</span><br><br>
# Issue the following Linux command to display i-node numbers for all of those files:<br><span style="color:blue;font-weight:bold;font-family:courier;">ls -li ~/links2/text-file.txt ~/links2/text-file.sym.lnk ~/text-file.sym.lnk</span><br><br>What do you notice? What is the file size of <span style="font-weight:bold;font-family:courier;">~/links2/text-file.txt?</span><br>What pathname do you think this file contains?<br><br>
# Use a text editor to edit the '''symbolic''' link file called: <span style="font-weight:bold;font-family:courier;">~/links2/text-file.sym.lnk</span><br>and add some lines to the bottom of that file.<br><br># Save your editing session and exit your text editor.<br><br># Issue the following Linux commandto view the contents of the '''original''' file:<br><span style="color:blue;font-weight:bold;font-family:courier;">cat ~/links2/text-file.txt</span><br><br>What did you notice?<br><br># Use a text editor to edit the original file called: <span style="font-weight:bold;font-family:courier;">~/links2/text-file.txt</span><br>and add some lines to the bottom of that file.<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? What does this tell you about symbolic links?<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/scripts/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>
13,420
edits

Navigation menu