You are on page 1of 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