Solved

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

Posted on 2006-06-22
2
303 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

815 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now