Assignment 2
Assignment 2
Write the Answer in your own words. The screenshot should contain command and output
including your username. Organize your assignment properly.
Each question or section should have a separate answer below the question statement.
Screenshots need to be clear and readable.
Don’t copy & paste. Read about Humber’s academic dishonesty.
1. (7 points) Answer the following question for both files 1.1 and 1.2:
1.1 drwxrwxr-t 6 minhas staff 4096 Nov 18 2023 project
1.2 -rws—— 1 n012345 student 2495 Sep 10 2013 game
as
(a) 777 file1.txt
(b) 655 file2.pdf
(c) 664 file3 h
in
3. (3 points) In the previous question which permission is the riskiest – why? Which of the above permission
M
is safest – why? Explain in your own words.
4. (4 points) For the file -rw-wx-rwx foo.txt use symbolic representation change the permissions so that
ir
(a) The Owner and the group do not have any permissions. Others can only read it.
h
(b) The owner can write to it. The group can read it. Others will not have any permissions.
Ta
as
(b) How can you exit a file without exiting vi?
(c) How can you turn on line numbering in vi?
(d)
h
How is “copy and paste” and “cut and paste” performed in vi?
in
(e) Create file subjects using vi and type the following text and save it.
Operating System
M
Linux/Unix
Database Management Systems
(f) Open the file subjects using vim and insert the professors.txt at the top of existing text and stu-
ir
dents.txt at the end of file. Save the file with the new name college. As a result, you will have 4
files, professors.txt, students.txt, subjects and college.
h
Ta
Submission Guidelines
Submit a pdf containing your answers to the questions on the submission link (Submission of Assign-
ment1) under the Assignment Submission Folder on Blackboard.
Your document should contain your information: full name, student id and, section number.
Question: 1 2 3 4 5 6 Total
Points: 7 4 3 4 10 12 40
Bonus Points: 0 0 0 0 0 0 0
Score: