CyberTek - the future at the present!
Google

Archive for November, 2011

Finding text with grep

Posted by: (Nov 2)

Here is a simple way to search for text in a series of files, valid for all linux distros:

grep "my search string" / home / MyHome / *. txt

the grep command can also add other options:

- Perform a recursive search in sub-directories:

grep-r "my text" / home / MyHome

- Print only the name of the file where we have Notre occurrence:

grep-H-R "My Test" / home / MyHome

Published in: linux , shell , tips
Powered by CyberTek - Remote Assistance