LinuxQuestions.org
Review your favorite Linux distribution.
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 10-24-2004, 10:43 PM   #1
dasoslukos
LQ Newbie
 
Registered: Oct 2004
Posts: 4

Rep: Reputation: 0
Searching files on Linux


IM currently running Mandrake 10.1 CE and the gernal problem i have is i can't find any good way to search for files. is there any programs out there that make seaching for files as easy as winblows (is hard as that is to say) i just don't seem to beable to figure it out
 
Old 10-24-2004, 11:07 PM   #2
UsualTuxpect
Member
 
Registered: Aug 2004
Location: New York
Distribution: --------- Gentoo-2004.2 [2.6.8] Redhat-9 [2.6.6]
Posts: 545

Rep: Reputation: 31
#find /root/ -name *.xpi [will search fro files with extension .xpi in /root directory ]

#locate [ after you run #updatedb]
#whereis [ to locate the binary, source, and manual page files for a command ]
 
Old 10-24-2004, 11:12 PM   #3
goofyheadedpunk
Member
 
Registered: Aug 2003
Distribution: Arch Linux
Posts: 140

Rep: Reputation: 15
Quote:
as easy as winblows (is hard as that is to say)
There's no need to feel bad about liking something in Windows. If something is done how you like then there is no reason to feel bad about it. Good is good, and bad is bad. There are some things I dislike about Linux, and I absolutely love it. There are some things I like about Windows, but I absolutely hate it.

Zealotry is never a good thing.

Now, for your question. Are you looking for a command line app, or a gui app. If you're looking for something gui, I can't help you. Sorry.

Command line is a different story.

There are two different apps to use. One is "find" and the other is "slocate". Find manually searches your hard drive for whatever you tell it. For example, let's say I wanted to find the file speaktome_breathintheair in my home directory. I'd type
Code:
find /home/blt -name 'speaktome_breathintheair'
Now let's say I wanted to read that file after finding it. I could use two commands, but why not be lazy? In that case I'd type
Code:
find /home/blt -name 'speaktome_breathintheair' -exec less {} \;
The other option for finding files via command line is going to be slocate. It's a bit different in that it searches a database created of the locations of your files, rather than the hard drive. This has advantages, and disadvantages. Advantage: much faster. Disadvantage: isn't effective for recently created files ( unless you run updatedb as root and wait for a bit ).

You can read more about both commands in their respective man pages.
 
  


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
searching for files deept Programming 1 08-15-2005 11:54 AM
help searching files jorasmi Slackware 3 02-02-2005 04:06 AM
searching for multiple files ryedunn Linux - Newbie 4 09-27-2004 03:21 PM
Searching files for strings tmoorman Linux - Software 4 01-08-2004 01:46 PM
Searching for files in KDE 3.1? bolinux Linux - Newbie 1 10-10-2003 11:40 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration