Practical-3 Worksheet (Linux Administration Lab)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Practical-3 Worksheet (Linux Administration Lab)

Student Name: VASUDHA PRASAD UID: 21MCA2418


Branch: MCA Section/Group: 7/A
Semester: 1st Date of Performance:14/12/2021
Subject Name: Linux Administration Lab Subject Code: 21CAP-608

I. Task to be done:Using a single command, create the directory DIR1 and inside this create another
directory DIR2 and inside DIR2 create directory DIR3. Show the path of the DIR3 directory. Now add a
blank file named FILEDIR3 under a directory DIR3 and check whether the file got created or not. Now
come out of directory DIR3 to DIR1 in a one go and try to remove a DIR1 along with its including
directories and files.

Solution:

i. Creating Directories, Sub Directories , Files , and Removing Directory containing sub directories
and files.

i. QUES :Create a blank file ABC.txt. Add the contents using vi-editor as follows

“Have more than you show,


Speak less than you know”
By William Shakespeare

Save and quit from the file. Create another file named DEF.txt and enter the content “HELLO, HOW R
U?” in it. Now delete “R” and edit it as “ARE” and now move this file to another directory DIR1. At last
append the contents of ABC.txt to DEF.txt. After appending store the contents in DEF.txt file as
command to record script and at least 5 options to date command.

Solution:

 Creating a text file(ABC.txt) and then adding content in it and then displaying it.
 Creating another text file(DEF.txt) with content in it and then editing it again. And then moving
to another directory(DIR1)
Recording script of 5 date commands using (script) command and then appending it to DEF.txt.
 Learning outcomes (What I have learnt):

1. Learnt how to create a directory using single command


Evaluation Grid:

Sr. No. Parameters Marks Obtained Maximum Marks


1. Worksheet 10
2. Demonstration/Performance /Pre 5
Lab Quiz
3. Post Lab Quiz 5

You might also like