Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

747 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

13 Experts available now in Live!

Get 1:1 Help Now