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 ?

Los Angeles1Asked:
Who is Participating?
GhostInTheMacheenConnect With a Mentor Commented:
Give this a go from the working directory you want to search:
find . -name *.trc

Open in new window

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

find . -name '*.trc'
Good point, ozo, that should be quoted to avoid unintentional shell expansion.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.