Grep / ACK
Ack can be replacement for grep…..
# yum install ack
Suppose you are on /var/www/html, here you want to search text “phpsolutions” in all files in current directory…. you can use:
# ack phpsolutions
# man ack (for more options)
grep : print lines matching a pattern.
find : search for files in a directory.
# grep -iR 'phpsolutions' *.txt
(It will search phpsolutions 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/
2 Responses to Grep / ACK
Leave a Reply
You must be logged in to post a comment.
You completed several good points there. Used to do a search around the issue and located the majority of people goes in addition to using your blog.
I’ve recently started a blog, the info you provide on this site has solved the problem tremendously. We appreciate you all of your time & work…