Posts

Showing posts from November 13, 2018

Searching tool in Linux - Grep Commands

Image
    In Linux we use Grep as a search tool. It helps to search files on directory, search strings in a file. It is also a kind of a filter. Grep stands for Global search for Regular Expressions and Print . Grep helps to find strings in a large set of log files and codes. It is applicable for most of the files.     In this article we will be seeing some important grep commands with different options which will help us to make our search better.     The basic syntax for a grep command will include with the search string and filename. Different flags can be used for a customized search. Basic Syntax:                  grep "search_word" File_name        Our demo files will be Testfile_1.txt, Testfile_2.txt, Testfile_1.php. $cat Testfile_1.txt Hi LJunix users Im a searching document consists of some numbers and strings. Searching a number = 18976 Im searching document_1 Consists of numbers 1,2,3,4,5,6,7,8,9,0 $cat Testfile_2.txt Hi LJunix users Im searching documen

Blog Top Sites

Blog Log