13,420
edits
Changes
no edit summary
===Main Objectives of this Practice Tutorial===
:* xUnderstand the purpose and why links are used in Unix / Linux
:* xDefine the term '''inode''' number as it relates to a file on Unix / Linux
:* xDefine the terms: '''Hard''' Link and '''Symbolic''' Link
:* xIssue the '''ln''' command to create hard and symbolic links :* Define and understand the purpose of a '''process''' in Unix / Linux :* '''Run''' and '''terminate''' processes in the foreground and background :* '''Display''' and '''manipulate''' background and foreground processes<br>
===Tutorial Reference Material===
| style="padding-left:15px;" |Links
* Hard Links
* Symbolic Links<br><br>
Managing Processes
* Process Information
* Manipulating Processes
* Running commands / programs in background with &
| style="padding-left:15px;"|Linux Commands
* [http://man7.org/linux/man-pages/man1/kill.1.html kill]
|colspan="1" style="padding-left:15px;" width="30%"|Brauer Instructional Videos:<ul><li>x[https://www.youtube.com/watch?v=tZ94-qH9unM&list=PLU1b1f-2Oe90TuYfifnWulINjMv_Wr16N&index=9 Inodes and Links]<br/li><brli>[https://www.youtube.com/watch?v=q93POTgH-aQ&list=PLU1b1f-2Oe90TuYfifnWulINjMv_Wr16N&index=7 Processes and Jobs]</li></ul>
|}
===Linking Files===
Create a new file called “myfile”
Run the command “ls -il” to display the i- node number and link counter
'''Symbolic Links:'''
<table align="right"><tr valign="top"><td>[[Image:symbolic-link-1.png|thumb|right|300px|(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]</td><td>[[Image:inode-number-4.png|thumb|right|400px|(Image licensed under [https://creativecommons.org/licenses/by-sa/3.0/ cc])]]</td></tr></table>
A Symbolic Link is an indirect pointer to a file – a pointer to the hard link to the file
You can create a symbolic link to a directory
A symbolic link can point to a file on a different file system
A symbolic link can point to a nonexistent file (referred to as a "broken link")
Also known as soft links or symlinks
===Managing Processes===
=INVESTIGATION 1: LINKING FILES=
'''Review Questions:'''
# xWrite a single Linux command to create a hard link called '''~/backup/myfile.txt.lnk''' to the existing file called '''~/myfile.txt'''<br>Write a single Linux command to display detailed information for those files above displaying their i-node numbers.<br>In this case, will the inode numbers for those files above be the same or different?<br><br># x # x# x# x# x# x# xWrite a single Linux command to create a symbolic link called '''~/shortcuts/murray.saul.lnk''' to the existing directory called '''~murray.saul'''<br>Write a single Linux command to display detailed information for those files above displaying their i-node numbers.<br>In this case, will the inode numbers for those files above be the same or different?<br><br>What data is contained in the file called '''~/shortcuts/murray.saul.lnk'''?<br>What would be the size of the file called '''~/shortcuts/murray.saul.lnk'''?<br><br># Create Write a single Linux command to run the program called '''table~/clean.sh''' listing each Linux in the background.<br>What command would you issue to place the previously issued program in the foreground?<br>What command, useful options would you issue to confirm that were mentioned this program is running in the online assignment background?<br>What key-combination would you issue to send that program again into the background?<br><br># Write a single Linux command to display running processes in “real-time”.#1 and Write a single Linux command purpose for to terminal a process that has the following Linux commandsPID: '''x22384''' , # 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] Stopped vim a<br>[2]- Stopped vim b<br>[3]+ Stopped vim c</span><br><br>Write a single Linux command to bring the second-recently process placed in the background into the foreground.<br>Write a single Linux command to terminate the '''xjob #3''' , .<br><br># Create a '''xtable''' listing each Linux command, useful options and command purpose for the following Linux commands: '''xln''' , '''xps''' , '''xtop''' , '''xfg''' , '''xbg''' , '''xjobs''' , '''xkill'''
[[Tutorial8: Regular ExpressionsLinks / Process Management]]
[[Category:ULI101]]