Saturday, February 19, 2011

Search Files with Grep Command

Some times we want to search for text in a number of files.
Manually It'll take a lots of time. So Here is a command 
"grep": Global regular expression.
For this just make the use of following command. 
 
#ls -1rt | xargs grep -i  |more
 
Here -1 option will display the out output in listing,
then xargs will treat the output as files and grep 
command will search  in all specified directories.
At last this output will goes to more command 
i.e. displays output page wise.
 
 
Kuldeep 
!!Enjoy Linux 

2 comments:

Integrate Jenkins with Azure Key Vault

Jenkins has been one of the most used CI/CD tools. For every tool which we are using in our daily life, it becomes really challenges when ...