LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   search for a file in linux partition (https://www.linuxquestions.org/questions/linux-software-2/search-for-a-file-in-linux-partition-146936/)

sanjaya 02-16-2004 08:32 PM

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

synaptical 02-16-2004 08:38 PM

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>

etc. :p

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

locate <filename>

itsjustme 02-16-2004 08:42 PM

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....


All times are GMT -5. The time now is 09:30 AM.