Difference between revisions of "OPS705 Lab 3 (2221)"
(Created page with "= LAB PREPARATION = === Purpose / Objectives of Lab 3 === In this lab, you will practice working with the Linux command line by manipulating the file system in two separate i...") |
(No difference)
|
Revision as of 21:34, 31 January 2022
Contents
LAB PREPARATION
Purpose / Objectives of Lab 3
In this lab, you will practice working with the Linux command line by manipulating the file system in two separate investigations.
If you encounter technical issues, please contact your professor via e-mail or in your section's Microsoft Teams group.
Minimum Requirements
Before beginning, you must have:
- Successfully completed Lab 1
- Watched the Week 3 video lecture
- Read through the Week 3 slides, and have them handy as a reference for concepts
- Your Seneca Azure login credentials
- Your linked mobile device for 2FA
INVESTIGATION 1: Create the Directory Structure
In this investigation, you'll create the directory structure and text files you see in the tree diagram below. You will do so entirely on the command line using the utilities and command provided to you in the Week 2 lecture.
You work will be done entirely in your home directory.
To begin:
- Start your CentOS Linux VM in Azure (this may take a few minutes)
- Connect to the VM remotely using SSH
- Navigate to your home directory with this command:
cd ~
- In your home directory, recreate the directory tree in Figure 1. yourusername should be your own username home folder that already exists.
- To prove you've completed this section, run the following:
echo "My name is insertFullName, and I've completed the CentOS VM investigation." > ~/yourusername_lab2.txt
INVESTIGATION 2: Moving Files
In this investigation, you're tasked with moving a set of existing files. You will download and run a script, which will create a set of files in ~/tmp. It is then your job to create the directory structure seen in Figure 2, and move the files from ~/tmp to their proper location according to the file tree diagram. Do not delete and recreate files, and do not delete your work from Investigation 1.
- On your Linux VM, from your home directory, download script for this lab with the following command:
wget https://ict.senecacollege.ca/~chris.johnson/ops705/lab3_script.bash
- Give the script execute permissions:
chmod u+x ~/lab3_script.bash
- Run the script:
~/lab3_script.bash
- Check that the files 13-17 have been created in ~/tmp (These must come from the script, do not create them yourself)
- Using Figure 2 as a model, create the ~/shared directory structure
- Using Figure 2 as a model, move the files from ~/tmp to their proper location in ~/shared
Lab Submission
Submit to Blackboard's Lab Submission section full-desktop screenshots (PNG/JPG) of the following:
- From your home directory, run
tree
. Your screenshot should contain the entire output. (To install tree, run:sudo yum install tree
) - Run the following command and screenshot:
hostnamectl
Your professor will review your VMs directly; the screenshots are a backup in case of catastrophic issues.
Your professor will not check your lab until the screenshots have been submitted.
Make sure to fully stop your VMs when you're done!