Open main menu

CDOT Wiki β

Changes

Tutorial 8 - Links / Process Management

3,342 bytes added, 12:15, 8 June 2023
m
Protected "Tutorial 8 - Links / Process Management": OER transfer ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
Content under development
 
=LINKING FILES / MANAGING PROCESSES=
===Main Objectives of this Practice Tutorial===
= INVESTIGATION 1: LINKING FILES =
<span style="color:red;">'''ATTENTION''': The due date for successfully completing this tutorial (i.e. tutorial 8) is by Friday, December 15 April 21 @ 11:59 PM (Week 14).</span><br>
In this investigation, you will learn how to create '''hard links''' and '''symbolic links''' on your Matrix account,<br>and observe the <u>advantages</u> and <u>limitations</u> of using both types of links.
# 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>
# After you complete Complete the Review Questions sections to get additional practice.<br><br> = LINUX PRACTICE QUESTIONS = The purpose of this section is to obtain '''extra practice''' to help with '''quizzes'''. Here is a link to the [https://matrix.senecacollege.ca/~osl640/questions/osl640_week8_practice.docx MS Word Document of ALL of the questions] displayed below but with extra room to answer on the document to simulate a quiz: Your instructor may take-up these questions during class. It is up to the student to attend classes in order to obtain the answers to the following questions. Your instructor will NOT provide these answers in any other form (eg. e-mail, then work on youretc). '''Review Questions:'''# Hard Links:<ol type="a"><li>What is the purpose of creating a hard-link?</li><li>What is a limitation of a hard link?<li>Write a single Linux command to create a hard link called '''~/backup/myfile.txt.lnk''' for the <u>existing</u> file called '''~/myfile.txt'''</li><li>Write a single Linux command to display the '''i-node''' number for both files. Are the '''i-node''' numbers identical?</li></ol><br># Symbolic (Soft) Links:<ol type="a"><li>What is the purpose of creating a symbolic (soft) link?</li><li>What is a limitation of a symbolic (soft) link?</li><li>Write a single Linux command to create a symbolic link called '''~/shortcuts/murray.saul.lnk'''<br>to the <u>existing</u> directory called '''~murray.saul'''</li><li>Are the i-node numbers identical for both of those files?</li><li>What data is contained in the file called '''~/shortcuts/murray.saul.lnk'''?</li></ol><br># Background / Foreground Processes:<ol type="a"><li>Write a single Linux command to run the program called '''~/clean.sh''' in the '''background'''.</li><li>Write a single Linux command to place the previously issued program in the '''foreground'''.</li><li>Write a single Linux command to '''confirm''' that this program is running in the background.</li><li>What '''key-combination''' would you issue to send that program again into the '''background'''?</li><li>Write a single Linux command to have that process sent into the background to '''continue running'online assignment ''?</li></ol><br># Managing Background processes:<br><span style="text-indent:120px;">Use the following diagram to answer the accompanying questions.<br>Each of the following questions will use the diagram below and are treated as independent situations.<br><br><span style="font-family:courier;font-weight:bold;">[1]&nbsp; Stopped vim a<br>[2]- Stopped vim b<br>[3]+ Stopped vim c</span></span><ol type="a"><li>Write a single Linux command to bring the second-recently process placed in the background into the '''foreground'''.</li><li>Write a single Linux command to '''terminate job #3'''.</li></ol><br># Write a single Linux command to display running processes in “real-time”.# Write a single Linux command to terminate a process that has the following PID: '''22384'''<br><br># Aliases / History:<ol type="a"><li>Write a linux command to create an '' and complete 'alias''' called '''section4ld''' labelledthat issues the command: '''Linking files and directoriesls -ld'''</li><li>Write a linux command to unset the '''alias''' created in the previous question.</li><li>Issue a Linux command to list '''history''' of commands that match the pattern called '''touch'''.</li></ol><br># Create a '''table''' listing each Linux command, useful options and command purpose for the following Linux commands:<br>'''ln''' , '''ps''' , '''top''' , '''fg''' , '''bg''' , '''jobs''' , '''kill''' , '''alias''' , '''unalias''' , '''history'''
=LINUX PRACTICE QUESTIONS=[[Category:OSL640]]