LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to search a file/folder in filesystem (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-search-a-file-folder-in-filesystem-465220/)

natasha 07-18-2006 10:04 AM

How to search a file/folder in filesystem
 
Hello everybody,
a ***completely*** newbie question.... how do I search where a file/folder named "foo" is located in filesystem?
Kisses,

Nat

lugoteehalt 07-18-2006 10:17 AM

Install 'locate' or probably called 'slocate', if it isn't allready - probably is. Then do: updatedb, to update its database. Then do: locate foo, and add |less if a lot of output is expected - search through less with the / command.

Kisses to you too Nat.:)

Dragineez 07-18-2006 10:18 AM

Locate or Find
 
su
updatedb
exit
locate foo

or

find foo

ethics 07-18-2006 10:19 AM

there's a couple of things, depending on what programs you have installed (dont know what distro you have)

you can try

Code:

slocate <file>
Code:

locate <file>
Code:

find <top level directory> -name "file"
if it's an executable you could try

Code:

whereis <file>
prefix any of those commands with man eg.
Code:

man find
will show the man page with help on the command

natasha 07-18-2006 12:47 PM

You're all very kind, thank you to you all.


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