Solved

Search For A File By Fileame on Linux [Don't know the location]

Posted on 2006-06-22
2
304 Views
Last Modified: 2013-12-16
Hi,

I try to search for file by filename on linux, but I don't know where the file is located on the system.
Does any body know any cmd beside "whereis", "find", to find this file, because I think "whereis" and "find" does not search the whole system, and we have it provide a path.

thanks,

Jack

0
Comment
Question by:huabin
[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
  • 2
2 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 16964215
find / | grep "filename"

This will search the whole of the filesystem (provided it is run as root), and grep will extract any file which has "filename in its path.

(   (()
(`-' _\
 ''  ''
0
 
LVL 22

Accepted Solution

by:
pjedmond earned 250 total points
ID: 16964236
or:

find / -name filename

or any other variant...Obviously the command has to be run as a user who has permission to read the files.

(   (()
(`-' _\
 ''  ''

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Fine Tune your automatic Updates for Ubuntu / Debian
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

726 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