Course

Linux commands for beginners by My Solutions

How do you rate this course?

1

2

3

4

5

Teacher My Solutions

Welcome to My Solutions. My Solutions is a platform for those who want to learn Linux and MS Excel in HINDI in a Easy Way. My Solutions provides tutorial for Linux and MS Excel in HINDI in a Easy Way, So that you can learn Linux and MS Excel easily.

Share

Course content

0h04m

Linux Tutorial for beginners in HINDI - Sort Part 1

Sort command sort the contents of text file line by line. Sort is a Linux program used for printing lines of input text files and concatenation of all files in sorted order. Sort command takes blank space as field separator and entire Input file as sort key. It is important to notice that sort command don’t actually sort the files but only print the sorted output, until your redirect the output.

Syntax :-

#sort [OPTIONS] [FILENAME]

Sort Command Options:-

-r :- Reverse Sorting
-n :- Sorts numerically
-f :- Case Insensitive Sorting
-c :- To check that whether a text file is sorted or not.
-u :- To remove the duplicate lines from sorted output
-k :- To Sort on a column or word positions in lines of Text file.

0h01m

Sort Command in Linux in HINDI - Part 2

Sort Command in Linux:
To perform a numeric sort, execute the following command :-
Syntax:-
#sort -n filename

Example:-
#sort -n myfile.txt

0h02m

Linux Tutorial for beginners in HINDI - Sort Part 3

To sort on human readable numbers( e.g. 1K, 1M, 1G), using –h option:-

Syntax:-
#sort -h filename

Example:-
#sort -h ztest.txt

0h01m

Sort Command in Linux - Part 4

To sort in reverse order:-

Syntax:-

#sort -r filename

Example:-

#sort -r myfile.txt

0h02m

Sort Command in Linux - Part 5

To sort months of an year using –M option:-

Syntax:-

#sort -M filename

Example:-

#sort -M month.txt

0h02m

Sort Command in Linux - Part 6

To get unique lines in sorted output, using –u option:-

Syntax:-

#sort -u filename

Example:-

#sort -u myfile.txt

0h02m

Sort Command in Linux - Part 7

To check that the contents of a text file is already sorted or not:-

Syntax:-

#sort -c filename

Example:-

#sort -c myfile.txt

0h08m

Linux Command Tutorial for beginners in hindi - Grep Part 1

Grep Command in Linux
In this video, i will explain the function of 'Grep' Command in RHEL 6.

Syntax:-

#grep [OPTIONS] PATTERN FILENAME

0h02m

Grep Command in Linux in HINDI - Part 2

This video show you that how to highlight the search using GREP_OPTIONS

To highlight the search using GREP_OPTIONS you need to execute the following command:-

#export GREP_OPTIONS='--color=auto'

0h04m

Grep Command in Linux - Part 3

This video tell you that how to do Case insensitive search using grep -i and also describe how to search entire pattern using grep -w.

For Case insensitive search :-

Syntax :-

#grep –i “string” FILENAME

Example:-

#grep –i ‘apple’ myfile.txt

To check entire pattern :-

Syntax :-

#grep –w PATTERN FILENAME

Example:-

#grep –w ‘apple’ myfile.txt

0h02m

Linux Tutorial for beginners in HINDI - Grep Part 4

This video show you that how to display N lines after match.

Syntax :-

#grep -A N PATTERN FILENAME

Example:-

grep -A 5 'Banana' myfile.txt

0h03m

Linux Tutorial for beginners in HINDI - Grep Part 5

This video show you that how to display N lines before match.

Syntax :-

#grep -B N PATTERN FILENAME

Example:-

grep -B 5 'Banana' myfile.txt

0h03m

Linux Tutorial for beginners in HINDI - Grep Part 6

This video show you that how to display N lines around match.

Syntax :-

#grep -C N PATTERN FILENAME

Example:-

grep -C 5 'Banana' myfile.txt

0h06m

Linux Tutorial for beginners in HINDI - Grep Part 7

This video tell you that how to search multiple 'patterns' or 'strings' at a time with help of grep or egrep commands.

With using grep command:-

Syntax :-

#grep -e 'Pattern1' -e 'Pattern2' -e 'Pattern3' FILENAME

With using egrep command :-

Syntax :-

#egrep 'Pattern1|Pattern2|Pattern3' FILENAME

0h06m

Linux Tutorial for beginners in HINDI - Grep Part 8

This video will explain the inverse/invert match using 'grep -v'
command.

Syntax :-

#grep -v 'Pattern' FILENAME

Example:-

#grep -v 'Apple' myfile.txt

Invert Match with Case - Insensitive search:-

Syntax :-

#grep -vi 'Pattern' FILENAME

Example:-

#grep -vi 'Apple' myfile.txt

Invert match using multiple pattern at a time :-

Syntax:-

#grep -vi -e 'Pattern1' -e 'Pattern2' FILENAME

Example :-

#grep -vi -e 'Apple' -e 'Banana' myfile.txt

0h05m

Linux Tutorial for beginners in HINDI - Grep Part 9

This video will show you that how to count the total number of lines that match with the given pattern or string.

Syntax:-

#grep -c 'Pattern' FILENAME

Example:-

#grep -c 'Apple' myfile.txt

0h03m

Linux Tutorial for beginners in HINDI - Grep Part 10

This video will show you that how to display line number while displaying the output using grep -n.

Syntax:-

#grep -n 'Pattern' FILENAME

Example :-

#grep -n 'Apple' myfile.txt

0h03m

Linux Tutorial for beginners in HINDI - Grep Part 11

This video will show you that how to display only the file names which matches the given pattern using grep -l.

Syntax:-

#grep -l 'Pattern' FILEPATTERN

Example:-

#grep -l 'Apple' *

0h04m

Linux Tutorial for beginners in HINDI - Grep Part 12

This video will show you that how to show only the match string of any file using grep -o.

Syntax :-

#grep -o 'Pattern' FILENAME

Example:-

#grep -o 'w.*name' test1.txt

0h02m

Linux Tutorial for beginners in HINDI - PIPE (|) with Grep

In this video, i'm gonna show you the use of Pipe(|) in Linux.