Open main menu

CDOT Wiki β

Changes

Tutorial8: Links / Process Management

129 bytes added, 10:36, 2 September 2020
INVESTIGATION 1: LINKING FILES
# Use a text editor to create a file called '''~/links/data-file.txt'''<br><br>
# Enter the following text displayed below:<br><br><span style="font-family:courier;font-weight:bold;">This is line 1<br>This is line 2<br>This is line 3<br><br></span>
# Save your editing session and exit your text editor.<br><br>
# Issue the following Linux command:<br><span style="color:blue;font-weight:bold;font-family:courier;">ls -li ~/links/data-file.txt</span><br><br>View the '''i-node''' number for this file. What does this i-node number represent?<br><br>
# Issue the following Linux command to create the following hard link in the same directory: <br><span style="color:blue;font-weight:bold;font-family:courier;">ln ~/links/data-file.txt ~/links/data-file.hard.lnk<br><br>
# Use a text editor to create a file called '''~/links2/text-file.txt'''<br><br>
# Enter the following text displayed below:<br><br><span style="font-family:courier;font-weight:bold;">This is line one<br>This is line two<br>This is line three<br><br></span>
# Save your editing session and exit your text editor.<br><br>
# Issue the following Linux command to create the following symbolic link in the same directory: <br><span style="color:blue;font-weight:bold;font-family:courier;">ln -s ~/links2/text-file.txt ~/links2/text-file.sym.lnk</span><br><br>
# Issue the '''ls -li''' command for the '''~/links2''' directory.<br><br>What do you notice about both of these file's i-node numbers?<br>What do you notice about the size of the file ''~/links2/text-file.sym.lnk''?<br>What pathname do you think it represents?<br><br>
# Change to your '''home''' directory.<br><br>
# 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: <span style="color:blue;font-weight:bold;font-family:courier;">ln -s ~uli101 linux</span><br><br>
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">linux/assign1</span><br><br>What happened? Why?
 
:In the next investigation, you will learn how to manage processes on your Matrix server.<br><br>
13,420
edits