CS代考 ULI101 linux bash Final Exam – cscodehelp代写

ULI101 linux bash Final Exam
[ 20 Marks | 50 Minutes ] Instructions:

1. You can scroll through this file when it is open in the editor. The file is submitted for
marking after the editor closes it. Once submitted, an attempt cannot be accessed again.

2. You may use your notes, the Internet, or matrix itself (in another window) during the test.

3. Avoid all form of communication or collaboration with anyone online or offline during the test.

4. Acknowledge you’ve read and understood the above instructions and Seneca’s Academic Integrity
Declaration by typing your full name and today’s date in the space beside each item above.

—————————————– [ xxXxx ] ———————————————–

Q. Did you acknowledge Seneca’s Academic Integrity Declaration above? What are you doing during this final test to meet Seneca’s Academic Integrity Declaration?

Questions 2 through 5 use file /etc/passwd which has the first four non-blank lines below this line.

root:x:0:0::/root:/bin/bash
bin:x:1:1::/:/usr/bin/nologin
daemon:x:2:2::/:/usr/bin/nologin
knoppix:x:1000:998::/home/knoppix:/bin/bash

2. (2 Marks) Using awk show accounts in /etc/passwd that use /usr/bin/nologin as their login shell.

3. (2 Marks) Write a command line to display the first line of /etc/passwd in upper case.

4. (2 Marks) Using sed replace all occurrences of ‘nologin’ with ‘false’ in /etc/passwd.

5. (2 Marks) For contents of /etc/passwd above, write output of: grep -ve “in$” /etc/passwd

6. (1 Mark) This utility will rename a file

A. ren B. rem
C. rm D. None of the above

7. (1 Mark) This utility will remove only empty directories

A. rm B. del
C. rmdir D. None of the above

8. (1 Mark) Updates happen instantly when an associated file is changed yet data is only lost after
the last associated file is deleted:

A. soft links B. hard links
C. make a copy D. None of the above

9. (1 Mark) Output from this command shows a continuous display of all live processes

A. ps B. jobs
C. top D. None of the above

10. (1 Mark) aliases are stored in

A. ~/bash.rc B. ~/.bashrc
C. ~/bashrc D. None of the above

11. (2 Marks) Explain difference between the use of * in shell wild cards and regular expressions.
Name one utility you learned in ULI101 that supports regular expressions and two utilities that
support shell wild cards.

12. (2 Marks) When trying to run script hello.bash you see error message: ‘Permission Denied’.
Explain why that might happen and how will you fix it?

13. (3 Marks) Choose ANY ONE from the following (minimum 3 sentences):

A friend asks you to explain the use of sub-shells in Bash. Describe your answer with an example
demonstrating the use of sub-shells.

How has learning Linux through ULI101 changed what you do with technology. Describe one activity
you changed by learning Linux this semester. How do you plan to build on the Linux you learned
this semester.

Leave a Reply

Your email address will not be published. Required fields are marked *