Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unix Find

 
Kishen Singh Punjabi
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to find a data, how to search it in all the files in the directory.

Thanks,
Hemanth
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64688
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its unclear what you are asking. 'grep' will search through files and look for text.
'find' will look for file names, and perform some action on them.
 
Jim Venolia
Ranch Hand
Posts: 242
2
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had this in my .cshrc (now .tcshrc) file for decades:



usage is treegrep some/folder somePattern

I've got other versions that search only c source, java source, etc.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic