Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What's the best way to search my file system on ubuntu and get results almost instantly? I have used catfish , tracker and the usual search tool provided with ubuntu.

Tracker finds nothing, ubuntu search tool is too slow and catfish most of the time finds nothing. I have a lot of PDFs and DJVU files that I want to access. In windows, there is a program called search everything that returns results almost instantly. I want a similar linux tool.

Please provide a detailed answer as possible as I'm a newbie in linux. If such a tool doesn't exist in ubuntu, what's the chance that I can find such tool in other linux distribution e.g mandriva, redhat?

share|improve this question
1  
Related: askubuntu.com/q/4498/61218 –  Anwar Shah Sep 28 '12 at 19:18

6 Answers 6

Recoll can do this for you. It features full-text indexing for almost every document type you can imagine and a result overview sorted by page numbers for PDF documents.

enter image description here

enter image description here

You can install it through the software center (search for Recoll) or get the new newest version through the Recoll PPA (including a Unity lens/scope). First add the official Recoll repository:

sudo add-apt-repository ppa:recoll-backports/recoll-1.15-on
sudo apt-get update

If you are on Ubuntu 13.04 and below you will have to install recoll-lens:

sudo apt-get install recoll recoll-lens

For Ubuntu 13.10 and up use unity-scope-recoll instead:

sudo apt-get install unity-scope-recoll

If this is the first time you are installing from a PPA, make sure you read these first:

What are PPAs and how do I use them?

Are PPA's safe to add to my system and what are some "red flags" to watch out for?

You will have to execute Recoll at least once to build your search index before being able to use the Recoll lens/scope.

More extensive documentation on how to use Recoll can be found here.

share|improve this answer
    
Thanks,Glutanimate . I have recoll and it's useless . I don't want what's inside the documents . All I want is to type a part of the file name and I get the result fast . All the tools I have tried either do not return results at all or can only work occasionally . Catfish have worked fine once but after I restarted my computer and tried it again , it returned nothing –  Nabil Sep 28 '12 at 18:08
    
But you can do that as well. Just choose file type from the drop down menu ( the one that says All Items in the screenshot) –  Glutanimate Sep 28 '12 at 18:09
    
I have done that but it still doesn't work . maybe because I didn't tell the program where to search ?Does it search the whole hard disk? –  Nabil Sep 28 '12 at 18:14
    
You have to define where it searches. By default it searches through home only. See the documentation for more details. –  Glutanimate Sep 28 '12 at 18:14
2  
@BrianZ Thanks for your comment. With Ubuntu 13.10 and up you have to install a scope instead of a lens. I updated my answer accordingly. –  Glutanimate Jul 28 at 22:47

To search for file names only - ignoring content -
you can use locate tool. It is very fast on searching.

locate '*.pdf'

will list all the pdf file. See the manual page for more info.

$ locate --help
Usage: locate [OPTION]... [PATTERN]...

Search for entries in a mlocate database.

  -b, --basename         match only the base name of path names
  -c, --count            only print number of found entries
  -d, --database DBPATH  use DBPATH instead of default database (which is
                         /var/lib/mlocate/mlocate.db)
  -e, --existing         only print entries for currently existing files
  -L, --follow           follow trailing symbolic links when checking file
                         existence (default)
  -h, --help             print this help
  -i, --ignore-case      ignore case distinctions when matching patterns
  -l, --limit, -n LIMIT  limit output (or counting) to LIMIT entries
  -m, --mmap             ignored, for backward compatibility
  -P, --nofollow, -H     don't follow trailing symbolic links when checking file
                         existence
  -0, --null             separate entries with NUL on output
  -S, --statistics       don't search for entries, print statistics about each
                         used database
  -q, --quiet            report no error messages about reading databases
  -r, --regexp REGEXP    search for basic regexp REGEXP instead of patterns
      --regex            patterns are extended regexps
  -s, --stdio            ignored, for backward compatibility
  -V, --version          print version information
  -w, --wholename        match whole path name (default)
share|improve this answer

I also do a lot of searching through very large libraries of PDFs. For me, this is the #1 frustration of Linux that makes me miss MS Windows. I've tried it all at this point, and the solution I have settled on for now is to use the following programs in combination.

Unfortunately, none of these seem to be in the Ubuntu repositories at the moment, and may be unstable. So if Recoll (now in the default repository for Ubuntu 14.04 I beleive?) or something else works for you, better to stick with that.

1) Synapse

Installation: Read this post for details, but basically you can install it by running the following commands in a terminal.

sudo apt-add-repository ppa:synapse-core/testing
sudo apt-get update
sudo apt-get install synapse

Positive

  • Very fast, smart search results
  • If what you want doesn't come up right away, you can press down and tab to find more with "locate".

Negative

  • Only searches filenames, not text inside.
  • Seems to miss a lot, especially before you try "locate".

2) Launchy

Installation: Download the package here.

Positive:

  • Almost as fast as Synapse
  • Results are very comprehensive.

Negative:

  • Also only searches filenames.
  • Probably the buggiest of these three.

3) DocFetcher

Installation: Unless you can find it in a repository somewhere, you are stuck with the portable version. Download it here and follow the instructions.

Positive:

  • Searches inside the text of your PDFs
  • Comprehensive but relevant results, in a logical order (I usually find the results in Recoll or Tracker to be completely screwy in comparison)
  • Full document preview pane so you can see more of the file before you open it (not just a few lines)
  • Reasonably fast

Negative:

  • Hard to install and run natively in Ubuntu (e.g. without Java runtime)
  • Much slower than the apps that only search filenames

Hopefully Dash will catch up and make all of this obsolete, but in the meantime these three are mostly what I am using.

Other options maybe worth trying:

  • Gnome-Do might be a worthy alternative to Synapse, but last I checked it can only index 5000 files, and that is not enough for me
  • pdfgrep is sometimes useful but slow and has no GUI that I am aware of
share|improve this answer
2  
Very comprehensive answer, +1. My only suggestion would be to give Recoll another try. Out of all solutions it's the most configurable by far. And while it might take some time to tweak to your specific needs and use case I can only say that it's very much worth the effort. Luckily the documentation is very good and exhaustive. –  Glutanimate Jul 29 at 0:37
1  
Also, from the sounds of it you are more interested in a lightweight solution that retrieves documents based on their file name rather than their contents There's a new project I saw a few weeks ago that might fit the bill. It's called PyNeedle and uses Recoll's powerful indexer as its backend. I have yet to try it out but it might be a good alternative for your specific use case. –  Glutanimate Jul 29 at 0:39
    
@ Glutanimate Thanks... Now that I have the Recoll lens working in Dash since yesterday, I've been using it quite a bit. I will definitely look into your suggestions. –  Brian Z Jul 30 at 1:52

enter image description hereyou can also use gnome-search-tool . you can get it by sudo apt-get install gnome-search-tool

share|improve this answer
    
Thanks,August . I'm downloading it now. Hope it works –  Nabil Sep 28 '12 at 18:10
    
Yeah let us know , is it suits to your requirements or not . :D –  AgentCool Sep 28 '12 at 18:12
    
The download is complete but how can I use it? –  Nabil Sep 28 '12 at 18:15
    
open your unity dash and type as gnome-search-tool , it will opens with what and where you want to do the search . look the image . –  AgentCool Sep 28 '12 at 18:17
1  
Cool , It doesn't work too –  Nabil Sep 28 '12 at 18:27

The following Python code will return search results very quickly. Just change the second parameter in fnmatch.fnmatch(file,'*.txt) to whatever you are looking for. It's incredibly quick.

import fnmatch
import os

for file in os.listdir('.'):
    if fnmatch.fnmatch(file, '*.txt'):
        print file
share|improve this answer

Another option is Synapse.
Integrates Zeitgeist results.
I have a lot of documents on my system, and was surprised at how fast Synapse was able to find the files I need.

sudo apt-get install synapse

cheers

share|improve this answer
1  
The Unity dash also uses Zeitgeist and seems to be too slow for the OP. –  LiveWireBT Oct 24 '12 at 20:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.