Quiz 2 - CST8207 Linux PDF

Title Quiz 2 - CST8207 Linux
Course Operating System Fundamentals (GNU/Linux)
Institution Algonquin College
Pages 3
File Size 222.7 KB
File Type PDF
Total Downloads 24
Total Views 120

Summary

CST8207 Linux...


Description

CST8207_Linux System Support

Algonquin College – F2020

Quiz 2

by: Arsalan

Quiz2 is a written, take home quiz, you’ve got not just one day. but One week to complete your Quiz2 and Submit in Quiz2 DropBox located in your Main Section -> Activities -> Quiz2 DropBox. This Quiz helps your knowledge & also troubleshooting skillset.

--------------------------------------------------------------------------------------------------------------------Justify your answer for the following questions: (1 point each – Q10 6 points) 1. If A=”Hello” and B=”Happy ” and D=”Day “ and C=”Holi” what are the output of bellows: a) echo $ABC b) echo $B$D c) echo $AB$C$D d) echo $B$C$D$AD e) echo $A$E$B$DA$D Explain your answer: Example of how to answer: the output of Q1-a) is nothing because shell interpret ABC as one variable and there is no variable such as ABC so echo $ABC has no output The output of Q1-b) is HappyDay because shell interpret B & D is different variable and has $ sign before both of them. The output of Q1-c) is HoliDay because there is no shell interpret AB so this output coming from $B and $C The output of Q1-d) is HappyHoliDay because there is no shell interpret AD so output come from $B,$B and $D. The output of Q1-e) is HelloHappyDay, it is output of $A,$B, and $D. there is no shell interpret E and DA.

2. What is the output of this in an empty directory: $ touch x .z .zy .wxy .abcd ; echo .??* Explain your answer Output would be (.zy .wxy .abcd) because echo writes its arguments to standard output. Where .??* represents that any file starts with any two and more with be display on screen. Below is the screenshot

Rev 5.0 CST8207 Linux System Support - ©2020 – Algonquin College A.. Parsaei

CST8207_Linux System Support

Algonquin College – F2020

Quiz 2

by: Arsalan

3. What is in file xx after this: echo hi >a ; ln a b ; echo me >b ; ln a xx ; rm a b me is the output. Explain your answer:- We added echo hi to a & then ln(link) it with b. After that we add echo me to b and ln a & xx.Then delete a & b. try the outcome with echo xx and press enter and try with cat xx and output will be me.

4. If directory dir contains three four-character file names: .123 .124 .??? Then what is the output on your screen of this: echo dir/???? Explain why? Because the Echo command uses for display given argument textline. 5. Which environment variable contains your home directory? $HOME 6. If directory /a contains seven two-character names: aa, ab, ac, ad, a*, a?, ??, then write the command which removes only the single two-character name a? from the directory? rm /a/a\?

Rev 5.0 CST8207 Linux System Support - ©2020 – Algonquin College A.. Parsaei

CST8207_Linux System Support

Algonquin College – F2020

Quiz 2

by: Arsalan

7. Jane complains that she is not able to ssh to her computer at home remotely from coffee shop. She gets “connection refused” error message, research to see what could be the possible cause and what is your suggestion to address her problem? 8. Corbin is trying to create a hard link to his big file from one hard drive to another hard drive, but he keeps failing. What is the possible problems? 9. Create a directory called K_Student# (student# is your actual student number) and create a hard link HL_xx to it. What is the output (put screenshot here), justify the results.

The reason hard-linking directories is not allowed is a little technical. Essentially, they break the filesystem structure.

10. TASK: Write a script called IPMAC.sh to show the IPv4 address and MAC address of your Linux Box when you run it in your terminal (Like below)

(Note: Add screenshot of your code AND your output that works) (6 points)

To complete the task, add the feature of showing your IPv6 address of your Linux Box to above script.

Submit to Quiz 2 Dropbox Due: written on Quiz2 DropBox Rev 5.0 CST8207 Linux System Support - ©2020 – Algonquin College A.. Parsaei...


Similar Free PDFs