Link to home
Create AccountLog in
Avatar of Los Angeles1
Los Angeles1

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of GhostInTheMacheen
GhostInTheMacheen
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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

Avatar of ozo
find . -name '*.trc'
Good point, ozo, that should be quoted to avoid unintentional shell expansion.