File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Linux / UNIX and the fly likes Unix Find Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Unix Find" Watch "Unix Find" New topic

Unix Find

Kishen Singh Punjabi
Ranch Hand

Joined: Sep 14, 2012
Posts: 71

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

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852


[Asking smart questions] [About Bear] [Books by Bear]
Pat Farrell

Joined: Aug 11, 2007
Posts: 4659

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

Joined: Sep 07, 2013
Posts: 242

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.

Being cremated is my last chance at having a smoking hot body.
I agree. Here's the link:
subject: Unix Find
It's not a secret anymore!