Solved

LINUX, whereis

Posted on 2013-05-17
4
357 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 500 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

688 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