Professional Documents
Culture Documents
Operating System
Lab Journal 3
Student Name: AMMARA BABAR
Enrolment No.: 01-23151-043
Procedure: Start Linux operating system. Open terminal and type the commands for the following
tasks preceded by a dollar sign ($). Every command in terminal starts with a dollar sign.
Task 1.11
Check the difference between date +%l and date +%I?
Answer: %I gives you hour with the leading 0 and %l only gives you hour.
Task 1.18:
Command: $ date +%y
Output:
Task 1.20: Display date and time in your own custom format
Date:
Command: $ date +%Y-%m-%d
Output:
Time:
Command: $date +%s:%M:%H
Output:
Task 8.1: Take two variables. Perform Addition, Subtraction, Multiplication, Division, and
Mod operation on them using the two modes of Bench calculator taught to you.
Command:
$ c=$(echo "$a +$b" | bc)
Output:
Task 8.2: Perform the operations of sqrt(x), scale and power. (See details in tutorial provided)
Command:
$ c=$(echo "sqrt(50)" | bc)
$ c=$(echo "5^2" | bc)
$ c=$(echo "scale=5;sqrt(50)" | bc)
Output: