• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 361
  • Last Modified:

LINUX, whereis

I am running RHEL 6.4,

I want to find all file anmes of *.trc in my current directory and all subdirectories

However, wher I use "wehreis *.trc":, I only gets hits on the current dir

I examined how to do this in the whereis doc, but could not find a subdir option

How can I find all occurences of a file named this way in subdirs ?

Thanks
0
Los Angeles1
Asked:
Los Angeles1
  • 3
1 Solution
 
GhostInTheMacheenCommented:
Give this a go from the working directory you want to search:
find . -name *.trc

Open in new window

0
 
GhostInTheMacheenCommented:
An alternate syntax using grep for about the same result -- a little more flexible if you're running complex searches that require regular expressions:
find . | grep '\.trc$'

Open in new window

0
 
ozoCommented:
find . -name '*.trc'
0
 
GhostInTheMacheenCommented:
Good point, ozo, that should be quoted to avoid unintentional shell expansion.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now