LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-06-2003, 08:15 PM   #1
johnyy
Member
 
Registered: Jun 2003
Posts: 92

Rep: Reputation: 15
redhat linux search


hello, i wonder how to find a files in my hard-drive ? what command i going to use ??

thanks
 
Old 09-06-2003, 08:36 PM   #2
contrasutra
LQ Guru
 
Registered: Mar 2003
Location: New Jersey
Distribution: Arch Linux
Posts: 1,445

Rep: Reputation: 47
You have two options:

1. Use "locate". The way locate works is it scans your harddrive and builds a database listing your files.

Then you use "locate" to search that database.

The advantage is that you can search your whole harddrive instantly, the disadvantage is that your database is not auto updating.

to create and update the database, run (as root):

Code:
updatedb
That will take a little while to update.

Then you can run:

Code:
locate file

2. Use the "Find" command. This is slow, but it searches your harddrive in realtime.

You can do something like this to search your whole harddrive:

find / -name "file"
 
  


Reply



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
Linux Search Tool superdude_876 Linux - Software 1 11-30-2005 07:03 PM
search default: search post title only slackie1000 LQ Suggestions & Feedback 4 03-10-2005 07:50 AM
Why does Redhat 9 search for drives that dont exist during bootup? glenn69 Linux - Newbie 9 08-12-2004 01:48 PM
Quick VIM question (unhighlighting search terms after search) lrt2003 Linux - Newbie 5 05-08-2004 05:21 PM
file search utility for LAN in redhat Avijit Linux - Networking 5 09-12-2003 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:04 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
Open Source Consulting | Domain Registration