3
Experiment 1.3
Student Name:JHA AMIT SUMAN UID:20BCA1066
Branch: UIC (BCA) Section/Group: 3/B
Semester: 4th
Date of Performance:18/03/2022
Subject Name: Linux Administration Lab Subject Code:22E-20CAP-256
1. Aim/Overview of the practical:
a) Using the command like mkdir, touch etc. for file and directory creation.
b) Using vi editor and script command for read and write in text files.
2. Task to be done:
Task of Answer 1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.
Task of Answer 2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.
3. Concept Used:
echo: to display text on screen within double quotes.
mkdir -p: to create parent directory and within sub directories.
ls-R: to display files and sub files.
cd: to change one to another directory.
touch: to create files.
cd ../.. : to go two directories back.
pwd: to print working directory.
rm -r: to delete parent + sub directories.
Vi filename: to open file in vi editor.
i(in vi editor): to enable insert mode.
ESC(in vi editor): to enable command mode.
%s/word/replace/g: to search a word and replace with another word.
cat file1 >> file2: to append file1 into file2.
script filename: to save commands as a script in a file.
date: to get current date.
date -u: to print date in UTC format.
date “%D %T”: to print date and time.
date –date=”value”: to print date of given value time.
date “+%Y/%d/%t”: to print year date and time.
4. Steps/Commands involved to perform practical:
Steps of Answer 1
Step 1. Use mkdir command with option -p with value of path to create sub directories.
Step 2. Use cd command to change directory to DIR3.
Step 3. Use ls with option -R to show recursive path.
Step 4. Make a FILEDIR3 named file with the help of touch command.
Step 5. Use ls to check whether file is created or not.
Step 6. Use cd ../.. to go two directories back and can add more dots and forward slash in order go
further back in directory.
Step 7. Use rm with option -r and directory name to delete that directory recursively.
Steps of Answer 2
Step 1. Use touch command to create an empty text file named ABC.txt.
Step 2. Open the same text file in vi editor and enable insert mode in order to write given text. Then, just
save the file with wq command.
Step 3. Create another file in same manner and write text. If want to replace some word in vi editor use
%s/original word/new word/g.
Step 4. Use the mv command to move text file to DIR directory.
Step 5. Now, use cat command to append the data of one file to another.
Step 6. At last, type script with given text file and hit enter. Then, use 5 different – different date
Commands and type exit.
5. Result/Output/Writing Summary:
Result of answer 1
Result of answer 2 
Exp_3_20BCA1066 Linux.docx
Exp_3_20BCA1066 Linux.docx
Exp_3_20BCA1066 Linux.docx
Exp_3_20BCA1066 Linux.docx
Learning outcomes (What I have learnt):
1.Learnt how to perform basic commands in Linux.
2.What is file hierarchy in linux.
3.Learnt the use of vi editor in Linux.
4.Learnt the use of script command in Linux.
5.Learnt the text editing commands in vi editor.
Evaluation Grid:
Sr. No. Parameters Marks Obtained Maximum Marks
1. Demonstration and Performance 5
2. Worksheet 10
3. Post Lab Quiz 5

More Related Content

PDF
DDD - 5 - Domain Driven Design_ Repositories.pdf
PDF
Os structure
PPTX
Methodology conceptual databases design roll no. 99 & 111
PDF
Wp unit 1 (1)
PDF
Unit 2
PPTX
Microservices Architecture Part 2 Event Sourcing and Saga
PPTX
Design Patterns - General Introduction
PDF
Advanced Database Lecture Notes
DDD - 5 - Domain Driven Design_ Repositories.pdf
Os structure
Methodology conceptual databases design roll no. 99 & 111
Wp unit 1 (1)
Unit 2
Microservices Architecture Part 2 Event Sourcing and Saga
Design Patterns - General Introduction
Advanced Database Lecture Notes

What's hot (16)

PDF
Embedded Storage Management
PDF
1..Net Framework Architecture-(c#)
PPTX
Dos%20commands(1)
PPTX
DDD (Domain-Driven Design)
PDF
Breaking Down the Entry Barriers on Linux Kernel Networking Stack
PDF
Functional Load Testing with Gatling
PDF
parallel Questions & answers
PDF
MR201406 A Re-introduction to SELinux
PPT
Presentation On RAID(Redundant Array Of Independent Disks) Basics
PPT
Deadlock in OS
PPTX
Lec 1 indexing and hashing
PPTX
Builder pattern
PDF
The aggregate is dead! Long live the aggregate! - SpringIO.pdf
PPTX
01- DC.pptx
PPT
Basic Garbage Collection Techniques
PPT
Chapter18
Embedded Storage Management
1..Net Framework Architecture-(c#)
Dos%20commands(1)
DDD (Domain-Driven Design)
Breaking Down the Entry Barriers on Linux Kernel Networking Stack
Functional Load Testing with Gatling
parallel Questions & answers
MR201406 A Re-introduction to SELinux
Presentation On RAID(Redundant Array Of Independent Disks) Basics
Deadlock in OS
Lec 1 indexing and hashing
Builder pattern
The aggregate is dead! Long live the aggregate! - SpringIO.pdf
01- DC.pptx
Basic Garbage Collection Techniques
Chapter18
Ad

Similar to Exp_3_20BCA1066 Linux.docx (20)

DOCX
Exp_3_20BCA1311 Linux Labbyharshdeep.docx
DOCX
POS 433 Entire Course NEW
PPTX
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
PPSX
Unix_QT.ppsx
PPSX
Unix_QT.ppsx
PDF
Linux practicals T.Y.B.ScIT
PPTX
Linux day 2.ppt
PDF
Pos 433 pos433
PDF
Lab Assignment 1 Basic Linux CommandsThe purpose of this as.pdf
DOCX
Linux® Directory LogPOS420 Version 111University of Pho.docx
DOCX
fileop report
PDF
Linux OS guide to know, operate. Linux Filesystem, command, users and system
PDF
linux commands.pdf
DOCX
POS 433 Inspiring Innovation/tutorialrank.com
PDF
POS 433 Effective Communication - tutorialrank.com
PDF
Linux file commands and shell scripts
PPTX
Linux Ubuntu OpenSource Operating System
PDF
CEIS106_Final_Project.pptx.pdf
PPTX
File handling.pptx
Exp_3_20BCA1311 Linux Labbyharshdeep.docx
POS 433 Entire Course NEW
TERMINAL COMMANDS IN LINUX TERMINAL USED TO INTERACT WITH SYSTEM
Unix_QT.ppsx
Unix_QT.ppsx
Linux practicals T.Y.B.ScIT
Linux day 2.ppt
Pos 433 pos433
Lab Assignment 1 Basic Linux CommandsThe purpose of this as.pdf
Linux® Directory LogPOS420 Version 111University of Pho.docx
fileop report
Linux OS guide to know, operate. Linux Filesystem, command, users and system
linux commands.pdf
POS 433 Inspiring Innovation/tutorialrank.com
POS 433 Effective Communication - tutorialrank.com
Linux file commands and shell scripts
Linux Ubuntu OpenSource Operating System
CEIS106_Final_Project.pptx.pdf
File handling.pptx
Ad

More from ApkaAmitbro (8)

DOCX
EXP_2(20BCA1066 Internet).docx
DOCX
Worksheet (4) linux.docx
DOCX
Template of Worksheet (4).docx
DOCX
exp_1_20bca1108(kashish_dixit.docx
DOCX
exp 1 internet programing.docx
DOCX
new_worksheet.docx
DOCX
exp_1_20bca1066 Internet.docx
DOCX
exp unit 1 internet programing.docx
EXP_2(20BCA1066 Internet).docx
Worksheet (4) linux.docx
Template of Worksheet (4).docx
exp_1_20bca1108(kashish_dixit.docx
exp 1 internet programing.docx
new_worksheet.docx
exp_1_20bca1066 Internet.docx
exp unit 1 internet programing.docx

Recently uploaded (20)

PDF
GENERATOR AND IMPROVED COIL THEREFOR HAVINGELECTRODYNAMIC PROPERTIES
PDF
20A LG INR18650HJ2 3.6V 2900mAh Battery cells for Power Tools Vacuum Cleaner
PDF
PakistanCoinageAct-906.pdfdbnsshsjjsbsbb
PPTX
Computer Hardware - Technology and Livelihood Education
PDF
Tcl Scripting for EDA.pdf
PPTX
New professional education PROF-ED-7_103359.pptx
PPTX
Group 4 [BSIT-1C] Computer Network (1).pptx
PDF
ICT grade for 8. MATATAG curriculum .P2.pdf
PPTX
Chapter no 8 output devices dpart 2.pptx
PPT
System Unit Components and its Functions
PDF
Topic-1-Main-Features-of-Data-Processing.pdf
PPTX
unit1d-communitypharmacy-240815170017-d032dce8.pptx
PPTX
AI_ML_Internship_WReport_Template_v2.pptx
PPTX
ELETRONIC-PRODUCTS-ASSEMBLY-AND-SERVICING-NC-II-WEEK-1-Copy.pptx
PDF
CAB UNIT 1 with computer details details
PDF
Dozuki_Solution-hardware minimalization.
PDF
Presented by ATHUL KRISHNA.S_20250813_191657_0000.pdf
PDF
ISS2022 present sdabhsa hsdhdfahasda ssdsd
PDF
2_STM32&SecureElements2_STM32&SecureElements
PDF
2- Physical Layer (06).pdfgshshshbsbshshshhs
GENERATOR AND IMPROVED COIL THEREFOR HAVINGELECTRODYNAMIC PROPERTIES
20A LG INR18650HJ2 3.6V 2900mAh Battery cells for Power Tools Vacuum Cleaner
PakistanCoinageAct-906.pdfdbnsshsjjsbsbb
Computer Hardware - Technology and Livelihood Education
Tcl Scripting for EDA.pdf
New professional education PROF-ED-7_103359.pptx
Group 4 [BSIT-1C] Computer Network (1).pptx
ICT grade for 8. MATATAG curriculum .P2.pdf
Chapter no 8 output devices dpart 2.pptx
System Unit Components and its Functions
Topic-1-Main-Features-of-Data-Processing.pdf
unit1d-communitypharmacy-240815170017-d032dce8.pptx
AI_ML_Internship_WReport_Template_v2.pptx
ELETRONIC-PRODUCTS-ASSEMBLY-AND-SERVICING-NC-II-WEEK-1-Copy.pptx
CAB UNIT 1 with computer details details
Dozuki_Solution-hardware minimalization.
Presented by ATHUL KRISHNA.S_20250813_191657_0000.pdf
ISS2022 present sdabhsa hsdhdfahasda ssdsd
2_STM32&SecureElements2_STM32&SecureElements
2- Physical Layer (06).pdfgshshshbsbshshshhs

Exp_3_20BCA1066 Linux.docx

  • 1. 3 Experiment 1.3 Student Name:JHA AMIT SUMAN UID:20BCA1066 Branch: UIC (BCA) Section/Group: 3/B Semester: 4th Date of Performance:18/03/2022 Subject Name: Linux Administration Lab Subject Code:22E-20CAP-256 1. Aim/Overview of the practical: a) Using the command like mkdir, touch etc. for file and directory creation. b) Using vi editor and script command for read and write in text files. 2. Task to be done: Task of Answer 1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. Task of Answer 2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. 3. Concept Used: echo: to display text on screen within double quotes. mkdir -p: to create parent directory and within sub directories.
  • 2. ls-R: to display files and sub files. cd: to change one to another directory. touch: to create files. cd ../.. : to go two directories back. pwd: to print working directory. rm -r: to delete parent + sub directories. Vi filename: to open file in vi editor. i(in vi editor): to enable insert mode. ESC(in vi editor): to enable command mode. %s/word/replace/g: to search a word and replace with another word. cat file1 >> file2: to append file1 into file2. script filename: to save commands as a script in a file. date: to get current date. date -u: to print date in UTC format. date “%D %T”: to print date and time. date –date=”value”: to print date of given value time. date “+%Y/%d/%t”: to print year date and time. 4. Steps/Commands involved to perform practical: Steps of Answer 1 Step 1. Use mkdir command with option -p with value of path to create sub directories. Step 2. Use cd command to change directory to DIR3. Step 3. Use ls with option -R to show recursive path. Step 4. Make a FILEDIR3 named file with the help of touch command. Step 5. Use ls to check whether file is created or not. Step 6. Use cd ../.. to go two directories back and can add more dots and forward slash in order go further back in directory. Step 7. Use rm with option -r and directory name to delete that directory recursively. Steps of Answer 2 Step 1. Use touch command to create an empty text file named ABC.txt. Step 2. Open the same text file in vi editor and enable insert mode in order to write given text. Then, just save the file with wq command. Step 3. Create another file in same manner and write text. If want to replace some word in vi editor use
  • 3. %s/original word/new word/g. Step 4. Use the mv command to move text file to DIR directory. Step 5. Now, use cat command to append the data of one file to another. Step 6. At last, type script with given text file and hit enter. Then, use 5 different – different date Commands and type exit. 5. Result/Output/Writing Summary: Result of answer 1 Result of answer 2 
  • 8. Learning outcomes (What I have learnt): 1.Learnt how to perform basic commands in Linux. 2.What is file hierarchy in linux. 3.Learnt the use of vi editor in Linux. 4.Learnt the use of script command in Linux. 5.Learnt the text editing commands in vi editor.
  • 9. Evaluation Grid: Sr. No. Parameters Marks Obtained Maximum Marks 1. Demonstration and Performance 5 2. Worksheet 10 3. Post Lab Quiz 5