0% found this document useful (0 votes)
2 views

OS Lab Task 02

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

OS Lab Task 02

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Task 02

Name: Kamal Shah


Class ID: CU-4320-2023
Subject: OS Lab
Submitted to: Muhammad Yahya
Date: 11/ 15/ 2024
Trying the following commands:
Syntax: $date +%ch
1: a = Abbreviated weekday. A = Full weekday.
2: b = Abbreviated month. B = Full month.
3: c = Current day and time. C = Display the century as a decimal number.
4: d = Day of the month. D = Day in „mm/dd/yy‟ format
5: h = Abbreviated month day. H = Hour (00..23).
6: I = Hour (01..12)
7: j = Day of Year (001...366).
8: k = Hour, space padded (0...23).
9: l = Hour, space padded (1...12).
10: m = Month (01..12). M = Minute (00...59).
11: n = A newline. N = Nanosecond.
12: p = Display AM or PM. P = Display am or pm.
13: r = Locale’s 12-houre clock time. R = 24-hour hour and minute
14: s = Seconds since 1970. S = Second (00...60).
15: t = A tab. T = HH:MM: SS format
16: u = Day of week (1..7). U = Week number of year with Sunday as first day.
17: V = Week number of the year with Monday as first day of the week (01...53).
18: W = Day of week (0..6). W = Same as V but (00..53).
19: x = Locale’s date representation (DD/MM/YY). X = Time (HH : MM : SS).
20: y = Display the year in 2 digits. Y = Display the full year.
21: z = +hhmm numeric time zone. :z = +hh:mm numeric time zone.
22: ::z = +hh:mm:ss numeric time zone. :::z = Numeric time with “ : ” to necessary
precision (e.g -04).
23: Z = Alphabetic time zone abbreviation (e.g EDT).

Following are its Implementation:


1: cal <month> <year>; Command: It is used to display month of the given year.

2: <dir> to show directory of the selected folder.

3: <cd> for back from dir and open the dir.

4: <mkdir> The mkdir command is used to create a new directory under any directory.

5: <rmdir> to remove directory.

6: <cal –3> to show third fourth and fifth month of the current year.

7: <pwd> The pwd command is used to display the location of the current working

directory.

8: <cal -m month> to show the desired month.


9: <cal -y year> to show the desired year.

10: <who> Command: It is used to display who are the users connected to our computer

currently.

11: <ls> The ls command is used to display a list of content of a directory.

Practice commands:
1: Create a File Work.txt, wrote some words and then open it.

You might also like