Grep / ACK


Hits: 2495  

Grep / ACK

Ack can be replacement for grep…..

# yum install ack

Suppose you are on /var/www/html, here you want to search text “svnlabs” in all files in current directory…. you can use:

# ack svnlabs
# man ack    (for more options)

grep : print lines matching a pattern.

find : search for files in a directory.

# grep -iR 'svnlabs' *.txt 
(It will search svnlabs in all text files in current directory)

Sources:
http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
http://www.doyourself.org/index.php?page=5&ipp=10&category=linux
http://blog.amit-agarwal.co.in/2009/08/28/ack-on-solaris-grep-recursively/

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch