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

Experiment 2.1: Vasudha Prasad 21MCA2418 MCA 7/A 1st 14/12/2021 Linux Administration Lab

1. Enlist all files that start with f and have i or R as second character and end with a number from range 0-6. Write a command to search the word Good or good and have any integer from 0-9 at the end of that word. Exemplify egrep and fgrep for searching above pattern. List all files starting with word File and having any digit as fifth character and nothing else. List all files starting with a letter and ending in a number. 2. Create a file using vi editor named filters.txt. Enter the content i

Uploaded by

VASUDHA PRASAD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Experiment 2.1: Vasudha Prasad 21MCA2418 MCA 7/A 1st 14/12/2021 Linux Administration Lab

1. Enlist all files that start with f and have i or R as second character and end with a number from range 0-6. Write a command to search the word Good or good and have any integer from 0-9 at the end of that word. Exemplify egrep and fgrep for searching above pattern. List all files starting with word File and having any digit as fifth character and nothing else. List all files starting with a letter and ending in a number. 2. Create a file using vi editor named filters.txt. Enter the content i

Uploaded by

VASUDHA PRASAD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Experiment 2.

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

1. Aim/Overview of the practical: To gain knowledge about linux commands.

2. Task to be done:

 Implementation of commands such as:head, tail, sed, uniq, wc, sort, cut, cat, tac

3. Concept used:
 head: head is used to display the first parts of a file, it outputs the first 10 lines by default. We can use the –n
to display the desired number of lines.
 tail: It is the complimentary of head command. tail outputs the last parts (10 lines by default) of a file. We
can use the -n num switch to specify the number of lines to be displayed.
 sed: Sed is a stream editor. A stream editor is used to perform basic text transformations on an input stream
 uniq: uniq command is used to report or omit repeated lines, it filters lines from standard input and writes
the outcome to standard output.
 wc: wc command is used to count words, lines and characters for each file.
 sort: The sort filter (alphabetical sort) is used to sort lines of text files.
 cut: cut command is used to cut out selected fields (columns) of each line of a file, depending on a delimiter
or a count of bytes.
 cat: The cat (short for “concatenate“) command is one of the most frequently used command in Linux/Unix
like operating systems. cat command allows us to create single or multiple files, view contain of file,
concatenate files and redirect output in terminal or files.
 tac: tac command in Linux is used to concatenate and print files in reverse.
4. Steps/Commands involved to perform practical:
 Head: Syntax- $head <filename>
 Tail: Syntax- $tail <filename>
 Sed: Syntax- $sed “s/<>/<>/g” <filename>
 Uniq: Syntax- $sort <filename> | uniq –c
 WC: Syntax-$wc<filename>
 Sort: Syntax- $sort <filename>
 Cut: Syntax- $cut –c <coloumn><filename>
 Cat: Syntax- $cat <filename>>><filename>
 Tac: Syntax- $tac <filename>

5. Result/Output/Writing Summary:

 Head and Tail commands:


 SedCommand:
 Uniq, Wc, Sort and cut commands:
 Cat and Tac commands:

Learning outcomes (What I have learnt):

1. How to operate on linuxos.

2. Gain knowledge about daily life command

Evaluation Grid:

Sr. No. Parameters Marks Obtained Maximum Marks


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

You might also like