Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-18-2006, 11:04 AM   #1
LQ Newbie
Registered: Jul 2006
Distribution: Red Hat
Posts: 12

Rep: Reputation: 0
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?

Old 07-18-2006, 11:17 AM   #2
Senior Member
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
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.
Old 07-18-2006, 11:18 AM   #3
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 278

Rep: Reputation: 41
Locate or Find

locate foo


find foo
Old 07-18-2006, 11:19 AM   #4
Senior Member
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

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

you can try

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

whereis <file>
prefix any of those commands with man eg.
man find
will show the man page with help on the command

Last edited by ethics; 07-18-2006 at 11:20 AM.
Old 07-18-2006, 01:47 PM   #5
LQ Newbie
Registered: Jul 2006
Distribution: Red Hat
Posts: 12

Original Poster
Rep: Reputation: 0
You're all very kind, thank you to you all.


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
Why Do I need to run updatedb each time I search for a file or folder? lennysokol Linux - Software 4 05-30-2005 11:49 PM
scan folder to search file os2 Programming 7 03-03-2005 02:37 PM
DISCUSSION: Virtual Filesystem: Building a Linux Filesystem from an Ordinary File mchirico LinuxAnswers Discussion 0 10-28-2004 11:35 PM
Filesystem search with C++ unholy Programming 3 07-25-2004 05:09 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 03:26 AM > Forums > Linux Forums > Linux - Newbie

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

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