Os Lab 7
Os Lab 7
Submitted by:
Muhammad Ali (2757)
Muhammad Huzaifa:
Hassan Mubarak:
Subject Os Lab 6
Class BSCS 5 A
Dated: 1st May 2024
Question 1
A. Try the example on the ‘Pipes’ slide, using rev to reverse some text.
Command: echo My name is Khan | rev
Reversres text after echo, as show below:
B. Try replacing the echo command with some other commands which produce
output (e.g., whoami).
Command: whoami >> same_out
C. What happens when you replace rev with cat? You might like to try running cat
with no arguments and entering some text.
Question 2
a. Run the command ls --color in a directory with a few files and directories. Some
Linux distributions have ls set up to always use the --color option in normal
circumstances, but in this case we will give it explicitly.
In less:
Output: