0% found this document useful (0 votes)
17 views2 pages

Lab 2

The document provides instructions for a lab assignment on operating systems. It details two tasks for helping a new Ubuntu user learn basic commands. Task 1 involves guiding the user to perform 14 tasks like creating and merging files, changing permissions, finding files and displaying information. Task 2 requires creating a file with lab rules, converting file permissions to a numeric format using binary, changing the file permissions with chmod, and appending an ls command output to the file. Students are instructed to submit a word file with their work done at the Linux prompt and their roll number for file naming conventions. Plagiarism is prohibited.

Uploaded by

saqibjavedsunny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Lab 2

The document provides instructions for a lab assignment on operating systems. It details two tasks for helping a new Ubuntu user learn basic commands. Task 1 involves guiding the user to perform 14 tasks like creating and merging files, changing permissions, finding files and displaying information. Task 2 requires creating a file with lab rules, converting file permissions to a numeric format using binary, changing the file permissions with chmod, and appending an ls command output to the file. Students are instructed to submit a word file with their work done at the Linux prompt and their roll number for file naming conventions. Plagiarism is prohibited.

Uploaded by

saqibjavedsunny
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

National University of Computer & Emerging Sciences

Department of Computer Science


Operating Systems Lab
Lab # 2

Instructions:
1. Make a word document with the convention “SECTION_ROLLNO _LAB-NO”. In addition,
paste all of your work done at the LINUX prompt.
2. You have to submit a Word File.
3. Plagiarism is strictly prohibited; negative marks would be given to students who cheat.

Task 1
You are required to help a new Ubuntu user in performing Ubuntu commands.
Mr. Tom is new Ubuntu user. He want guidance regarding basic Ubuntu utilities to
perform following tasks:
1. Create a file named “20f-XXXX.txt”. File must contain at least 10 lines.
2. Create another file named “your name.txt”. File must contain at least 10 lines.
3. Merge the data of both files.
4. Redirect the output to a new file.
5. Display the first two lines of first file.
6. Display the last two lines of second file.
7. Finds the string (your roll#) from the first file.
8. Grant the execute permission of the second file to the group.
9. Remove the write permission for the owner.
10.Now Mr. Tom suddenly lost the track of his current location. Help him find his
location.
11.He wants the list of all files present on Desktop directory.
12.Now he wanted to create a folder of his personal files and pictures named as
your roll#.
13.Display the current time.
14.He is done with the task and he is happy with your work. He want to display a
thankyou message.

Task 2
1. Create a file named “20f-XXXX_OS-lab_rules.txt” using linux commands.
The file must contain some lab rules covered in first lab.
2. You want to set the rights of created file to this (- rwx r-x r--). For these
rights, you are required to convert the given rights in numeric format using
binary number system procedure covered in lecture. Show complete working.
3. Now use the derived number to change the permission of a file using chmod
command.
4. Append the output of ls command to created file.

You might also like