?
Solved

LINUX, whereis

Posted on 2013-05-17
4
Medium Priority
?
358 Views
Last Modified: 2013-05-17
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
Comment
Question by:Los Angeles1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
GhostInTheMacheen earned 2000 total points
ID: 39176189
Give this a go from the working directory you want to search:
find . -name *.trc

Open in new window

0
 
LVL 3

Expert Comment

by:GhostInTheMacheen
ID: 39176199
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
 
LVL 84

Expert Comment

by:ozo
ID: 39176200
find . -name '*.trc'
0
 
LVL 3

Expert Comment

by:GhostInTheMacheen
ID: 39176232
Good point, ozo, that should be quoted to avoid unintentional shell expansion.
0

Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month12 days, 4 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question