-   Linux - Software (
-   -   Searching files on Linux (

dasoslukos 10-24-2004 10:43 PM

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 :(

UsualTuxpect 10-24-2004 11:07 PM

#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 ]

goofyheadedpunk 10-24-2004 11:12 PM


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

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

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.

All times are GMT -5. The time now is 08:03 AM.