National University of Technology
Computer Science Department
Semester Fall – 2023
LAB REPORT - 02
Course: OS Lab
Course Code: CS4014
Submitted To: Submitted By:
Name: Lec Amna Ikram Name: Haris Mehmood
Eng Syed Ahmad Raza Reg No: F21605054
CS Department
Task 01
cd → used to get inside of any directory
ls → used to list down all the elements inside of any directory
ls / → used to list down all the elements inside of root directory
ls /usr → used to list down all the elements inside of user`s home directory
pwd → used to print the present working directory
cd .. → used to jump back one directory
cd → used to jump back to the user directory
mkdir → used to create a new directory(Folder)
rmdir → used to delete a directory(Folder)
man → used to get all the information about any command
cp → used to copy any file from one directory to another
mv → used to move any file from one directory to another
Task 02
1. Display your current directory.
2. Change to the /etc directory.
3. Go to the parent directory of the current directory.
4. Go to the root directory.
5. List the contents of the root directory.
6. List a long listing of the root directory.
7. Stay where you are, and list the contents of /etc.
8. Stay where you are, and list the contents of /bin and /sbin.
9. Stay where you are, and list the contents of ~
Task 03
1. Create a directory “mydir1” in Desktop Directory. Inside mydir1 create
another directory “mydir2”.
2. Change your current directory to “mydir2” using absolute path
3. Now, change your current directory to Documents using relative path
4. Create mydir3 directory in Documents directory and go into it
5. Now, change your current directory to mydir2 using relative path
Task 04
1. move myfile to mydir1
2. copy myfile to mydir2
3. copy mydir2 on Desktop
4. delete mydir1 (get confirmation before deleting)
5. Rename myfile to mynewfile