Question
Part 1) Basic concepts [6 marks] a) What do you mean by your home directory in UNIX? Write the absolute path of your home directory.
Part 1) Basic concepts [6 marks]
a) What do you mean by your home directory in UNIX? Write the absolute
path of your home directory.
b) What are the differences between absolute and relative path in UNIX?
c) Can root/superusers read your read access protected files?
d) Write the meaning of the following special characters used in Unix.[3 marks]
.(dot) = |
.. (double dot) = |
/ = |
* = |
? = |
~ = |
Part 2:Unix Command [6 marks]
a) Suppose you are in your home directory. Write a command that will search your username from /etc/passwd and will send the information to a file named myfile, which is on your home directory.
b) Suppose we have the following files under a directory called flower. Display only top 3 files sorted in alphabetical order.
cat elephant bird fox dog
c) Assume we have the following list of files in the current working directory. Using wildcard/ambiguous file names, issue a single command to list all the files (in long format) that include the word section and sort them in reverse order.
section1 firstsection multipesections section4a
CPAN133- Operating Systems Winter 2023 (10% of final mark)
Part 3) Permissions in Linux [8 marks]
Your answer should be in a way how you write the commands to accomplish the task.
a) For each of the following explain what permissions are granted. A file with: [3 marks]
1) 777 permissions
2) 655 permissions
3) 455 permissions
b) In the previous question which permission is the riskiest? Why? Which of the above permission is safest ? Why? [1 mark]
c)For the following file
-rw--wxrwx foo.txt
Change the permissions so that ( use symbolic representation) [4 marks]
1) The Owner/user and the group do not have any permissions. Others can read it.
2) The owner can write to it. The group can read it. Others will not have any permissions.
3) Only others have the permission to read it.
4) Only the owner can read it.
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