Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-16-2004, 09:32 PM   #1
Registered: Feb 2004
Location: sri lanka
Posts: 47

Rep: Reputation: 15
search for a file in linux partition

how can i search for a particular file in the linux partition at once rather than going one by one folder
Old 02-16-2004, 09:38 PM   #2
Senior Member
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 47
search from the root partition where you want to start. for example, if you want to start from /, do:

find / -iname <filename>

to search in /etc:

find /etc -iname <filename>


p.s. if you update the database regularly (updatedb), you can do locate instead -- it's much faster:

locate <filename>

Last edited by synaptical; 02-16-2004 at 09:40 PM.
Old 02-16-2004, 09:42 PM   #3
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
To go from the current directory down:

find . -name 'filename'

(I'm not sure about that 'iname' thing. Is that a typo? Never mind. Looked it up. Case insensitive search.)

I always single quote the thing I am searching for.

edit: Don't forget you can use wildcards 'text*', '*text*', 'text[a-z]', etc....

Last edited by itsjustme; 02-16-2004 at 09:44 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to search file in linux paschim Linux - General 4 10-20-2004 02:56 PM
Link of Linux file in Windows Partition indian Linux - General 6 08-15-2004 02:49 PM
Find File broken, need search utility, where does WineX install, KDE file roller? Ohmn Mandriva 6 07-05-2004 11:34 PM
How to 'apt-cache search' & 'apt-file search' by distribution? davidas Debian 3 04-19-2004 02:56 PM
What is the code to copy a file from my windows partition to my linux partition? THEBIGFISH Linux - Newbie 3 03-15-2004 11:14 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration