?
Solved

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

Posted on 2006-06-22
2
Medium Priority
?
307 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 1000 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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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…
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.:
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

762 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