LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-18-2006, 11:04 AM   #1
natasha
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?
Kisses,

Nat
 
Old 07-18-2006, 11:17 AM   #2
lugoteehalt
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
Dragineez
Member
 
Registered: Oct 2005
Location: Annapolis
Distribution: Ubuntu
Posts: 275

Rep: Reputation: 32
Locate or Find

su
updatedb
exit
locate foo

or

find foo
 
Old 07-18-2006, 11:19 AM   #4
ethics
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

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

Last edited by ethics; 07-18-2006 at 11:20 AM.
 
Old 07-18-2006, 01:47 PM   #5
natasha
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.
 
  


Reply


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


All times are GMT -5. The time now is 09:01 PM.

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