Answered step by step
Verified Expert Solution
Question
1 Approved Answer
~ - $ tree /home/ HomeDir/Midterm /home/HomeDir/Midterm deleted misc song.mp3 song.wav personal letter01.txt work letter02.txt letter_of_engagement.txt to_do_list.txt 4 directories, 6 files File *COMP3044 Midterm
~ - $ tree /home/ HomeDir/Midterm /home/HomeDir/Midterm deleted misc song.mp3 song.wav personal letter01.txt work letter02.txt letter_of_engagement.txt to_do_list.txt 4 directories, 6 files File *COMP3044 Midterm Test Summer 2022 V1.txt - Notepad Edit Format View Help Midterm Hands-On Exam Exam Duration: 1 hour. Instructions: Add your answers to this TEXT document where indicated (do not remove questions) and upload your completed work to the provided on BlackBoard Midterm Handson Test drop box. The exam has a cut off day/time set. The work will not be accepted once the cut off time/date has passsed and the mark of zero will be given for the exam. There are 10 questions. All questions have equal value. Total is 10 marks. Download the COMP 3044 Midterm Test Summer 2022.jpg (Pic1) from the Midterm Test on BlackBoard. In this picture, HomeDir is Your Account Home directory. NOTE: !!!! all paths MUST be absolute paths !!!! A 50% grade reduction penalty will be applied to every question where an absolute path was not used. Questions: Q01) Create the directory structure as shown in the Pic1 and add files as indicated in the Pic1 (all those files are plain text files). Answer: mkdir -p /dpara/Midterm Q02) Create folder called not_checked inside of the personal folder and move the letter01.txt and letter02.txt files to the not_checked folder. Answer: Q03) Using a single command with wild cards, copy song.mp3, song.wav, letter01.txt, and letter02.txt files to deleted folder. Answer: Q04) Using a single command with wild cards, remove the content of the deleted folder (do not remove the folder itself). Answer: Q05) Rename the letter_of_engagement.txt file into contract.txt (make sure the file stays in the work folder). Answer: Q06) Move the misc folder and its content to the personal folder. Answer: Q07) Copy the personal folder and its content to the work folder. Answer: Q08) Write the "grep" command that displays the lines from the /etc/hosts file that begin with a numeric character and end with ether character 't' or 's'. Make the command case insensitive. Answer: Q09) Write the complete bash script that will take the two numeric values as command line arguments. The script must verify that two command line argument values were given. If the values were not given, the script should display an error message and stop. If the values were given, then the sum of the values should be calculated and displayed. Answer: Q10) Use the "tar" command to create a bzip2 compressed archive of the /home folder. The completed archive should be stored in the /tmp folder. Redirect the errors to the null device. Answer: O WS 0 Ln 58, Col 86 80% Windows (CRLF) UTF-8 x D 5:18 PM 7/5/2022 A
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started