Monday 23 June 2014

Find inside a file or directory

Problem: Find a word inside a file or directory

Solution: grep command can be used to find a word inside a file.


[root@iravath search]# grep -rnw '.' -e "Apple"
./names.txt:3:Apple
 
The above command search for word "Apple" inside a file. The word "Apple" was found in names.txt at line number 3.

10 comments:

  1. I found this informative and interesting blog so i think so its very useful and knowledge able.I would like to thank you for the efforts you have made in writing this article.

    angularjs Training in bangalore

    angularjs Training in electronic-city

    angularjs Training in online

    angularjs Training in marathahalli

    ReplyDelete
  2. Thanks you for sharing this unique useful information content with us. Really awesome work. keep on blogging
    Java training in Chennai | Java training in Bangalore

    Java interview questions and answers | Core Java interview questions and answers

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.

    Data Science Training in Indira nagar | Data Science Training in btmlayout

    Python Training in Kalyan nagar | Data Science training in Indira nagar

    Data Science Training in Marathahalli | Data Science Training in BTM Layout

    ReplyDelete
  5. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.
    Angular js Training in Chenai

    Angular js Training in Velachery

    Angular js Training in Tambaram

    Angular js Training in Porur

    Angular js Training in Omr
    Angular js Training in Annanagar

    ReplyDelete