Open main menu

CDOT Wiki β

Changes

OPS705 Lab 2 (2227)

304 bytes added, 02:17, 8 January 2023
m
Chris.johnson moved page OPS705 Lab 2 to OPS705 Lab 2 (2227) without leaving a redirect
Perform the following steps:
<table align="right"><tr valign="top"><td>[[Image:script-check-1.png|thumb|right|250px|If all check checks pass, then user performed task correctly and can continue.]]</td><td>[[Image:script-check-2.png|thumb|right|450px|If there is a warning, then feedback is provided to user to correct and re-run checking script.]]</td></table>
# Make certain that your current directory is your home directory.
#* If you encounter errors, then view the feedback to make corrections, and then re-run the checking script.
#* If you receive a congratulations message that there are no errors, then proceed to the next part.
# Assuming you received a '''congratulations''' message, take a screenshot of the full script output. You'll need it for later.
==Part 2: Viewing Directory Contents / Copying & Moving Directories==
# Make certain that your current directory is your home directory.
# Run the checking script for Part 2: <code>labcheck2.2.sh</code>
# Take a screenshot of the full script output. You'll need it for later.
If you encounter errors, make corrections and re-run the checking script until you receive a congratulations message.
# Change to the examples directory in your recently-created directory structure: <code>cd tutorial3/practice/examples</code>
# Confirm you are located in the ''examples'' directory.
# Remembering that we are located in the ''examples'' directory, issue the following Linux command using a relative pathname to display files in the ''/bin '' directory: <code>ls ../../../../../bin</code>
# Now issue the following Linux command using an absolute pathname: <code>ls /bin</code>
#* '''Which type of pathname would be the best to use in this situation?'''
# Let's copy the file called ''ls'' which is contained in the ''/bin'' directory to your home directory by using the <code>cp</code> command.
# First, copy the ''ls'' command from the ''/bin'' directory to your home directory using absolute pathnames: <code>cp /bin/ls /home/youruserid</code>
# Now let's issue the previous command using just relative pathname (remember, our current directory location is ''examples''): <code>cp ../../../../../bin/ls ../..</code>
#* '''TIP: For relative pathnames that move up multiple parent directories such as these, it is HIGHLY RECOMMENDED to view the tree diagram and check for the correct number of .. symbols. Students commonly make mistakes and lose marks on these type of questions!'''
# Let's issue the command using one absolute pathname and a relative pathname: <code>cp /bin/ls ../..</code>
= Lab Submission =
When complete, show your instructor Submit to Blackboard full-desktop screenshots (PNG/JPG) of the following in-class:
# A successful run of '''labcheck2.1.sh'''
# A successful run of '''labcheck2.2.sh'''
Make sure to fully stop your VMs when you're done!
 
= Licensing =
Author: Chris Johnson
 
License: [https://www.gnu.org/licenses/lgpl.html LGPL version 3]
[[Category:OPS705]]
[[Category:OPS705 Labs]]
[[Category:Digital Classroom]]
[[Category:Fall 2022]]