Skip to content

Operating Systems Lab

CSE · Quiz · Fall 26

Section 66 · Batch G

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Lab Evaluation - 01 Q1. Basic Linux commands Perform the following using terminal commands only. 1. Create a directory lab_eval, move into it, and create three empty files a.txt, b.txt and c.txt. 2. Write the text Hello Linux into a.txt using echo, copy it to d.txt, and display the contents of d.txt. 3. List all files with details (permissions, size, date), delete b.txt, and display the current working directory path. Q2. Script: names and arrays Write a script lab1.sh that asks the user to enter three names on one line using read -a, prints each name on a separate line as Name 1: abc, and prints the total number of names entered. Sample output: Enter three names: Ali Sara Rahim Name 1: Ali Name 2: Sara Name 3: Rahim Total names: 3 Q3. Script: arithmetic Write a script lab2.sh that reads two integers and prints their sum, difference, product, quotient and remainder. Sample output: Enter two numbers: 17 5 Sum = 22 Difference = 12 Product = 85 Quotient = 3 Remainder = 2