Grep Command GREP -- stands for Global Regular Expression Parser searching for a word in a file grep 200 filename example I am searching for string "ravana" in the file $ grep ravana data.txt Ravana 9309080497 ravana@gmail.com Newzealand Ravana 9309080497 ravana@gmail.com Newzealand You can also use "" to look for the content $ grep "ravana" data.txt Ravana 9309080497 ravana@gmail.com Newzealand Ravana 9309080497 ravana@gmail.com Newzealand Ravana 9309080497 ravana@gmail.com Newzealand Searching data in more than one file. grep "john" filename1 filename2 $ grep "ravana" data.txt info.txt data.txt:R...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Certainly! Here's an overview of some basic Linux commands: ls : This command lists the files and directories in the current directory. cd : This command changes the current directory to the specified directory. pwd : This command prints the current working directory. mkdir : This command creates a new directory. rmdir : This command removes an empty directory. rm : This command removes a file or directory. cp : This command copies a file or directory. mv : This command moves or renames a file or directory. cat : This command prints the contents of a file. less : This command displays the contents of a file, one page at a time. grep : This command searches for a pattern in a file. echo : This command prints a message to the screen. chmod : This command changes the permissions of a file or directory. chown : This comma...
Comments
Post a Comment