Grep / ACK

On October 15, 2009, in Fedora, LAMP, Linux, Tips, Tricks, by Sandeep Verma

Hits: 278  

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/



Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...