LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   search in RH8 (https://www.linuxquestions.org/questions/linux-software-2/search-in-rh8-57788/)

praveen_2003 05-02-2003 03:51 AM

search in RH8
 
iam using RH8 with kernel 2.4.18-14.i use KDE.but whenver i try to search for some files it takes a very long time nearly 20-30 minutes.is thee any problem with my installation.or any corrupted files juggling around there.?
*******thank you********

wapcaplet 05-02-2003 06:29 AM

What software are you using to do searches? Something in the GUI, or something more basic like find or locate?

'locate' is my favorite for finding files with a certain name (or part of a name). If you have it installed, open up a terminal and run 'updatedb' as root. Then you can use 'locate':

locate xyz

which will find all files or directories with 'xyz' in the name somewhere. Pretty handy, and very fast! (as long as updatedb was run recently)

whansard 05-02-2003 07:53 AM

maybe you have a slow computer, a lot of files, and
no udma enabled. search on this site for hdparm

rmartine 05-02-2003 01:32 PM

If you have some idea as to where the file is try using the find command. If you have it search the whole file system it will take forever.

For example, if you looking for something KDE related then have it search /usr

find /usr -name "file_name" 2>/dev/null

2>/dev/null sends the errors (files that don't match) to null so they don't appear on the screen.

bulliver 05-02-2003 02:21 PM

Just for elucidation: find searches all your files for a match, hence, depending on the size of your harddrive(s) it can take quite a while.

locate uses a database to search for files, which is updated with the updatedb command. The results are pretty much instantaneous, but may be out of date depending on when the database was last updated.

For this reason, it is wise to run updatedb as a daily cron task to be sure you are up to date....

whansard 05-02-2003 02:31 PM

you can make your own list of files and search
that quickly too.

find . -type f -print > /listoffiles.txt

then grep the list for quick searches.

grep mp3 /listoffiles.txt


All times are GMT -5. The time now is 07:35 AM.