This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to search text based content from home directory using find or grep?

 
James Dekker
Ranch Hand
Posts: 221
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How could someone using a Unix system (mine being OS X Snow Leopard) use find or grep (either separate or together) to search for files containing a specific string recursively in their home directory?

Is it better to use the locate command instead?

I've tried:









Thank you for taking the time to read this...
 
Eduardo YaƱez Parareda
Ranch Hand
Posts: 93
IntelliJ IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know if it's the best way, but works:




You need the -print option to print the path to files.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic