75

On Windows there a nice file search engine called Everything, which is (unlike find) very fast and (unlike locate) always returns up to date results. AFAIK it works by filling a database from the NTFS journal (it doesn't work with other filesystems).

I wonder if there's something similar (I don't care about the GUI; my point is the speed and the up-to-date guarantee) for Linux (ext3 or ext4); I have googled but found nothing. Can something like this be done or is even somebody working on it?

3
  • 7
    The thing I like about Everything is that it not only is instantaneous, but also works for multiple partitions, like multiboot systems with six windows installations plus several data partitions. I'd like to have a Linux search that will work across multiple Linux partitions, not just the single partition. Commented May 22, 2014 at 1:34
  • 1
    Many variant of locate exists (mlocate, slocate, rlocate,....) with there own characteritics (incremental updatedb, realtime or secure indexing,...). All are highly configurable (manpages of updatedb.conf and locate) Commented Sep 12, 2015 at 7:33
  • 4
    This may not exactly answer the question but today I finally understood why people rave about fzf. It's a lot quicker than find which I've been using blissfully ignorantly until now. Commented Apr 3, 2021 at 22:12

13 Answers 13

48

You may have a look at rlocate, a reimplementation of locate that is always up-to-date. Another interesting project is recoll which also supports real time indexing and allows you (like beagle) additionally do full-text searches. Finally I should mention doodle which also supports real time indexing. For doodle there are some nice frontends like catfish.

Note that you can also make (r)locate results clickable by using for example urxvt as terminal-emulator and by writing something like

URxvt.perl-ext: default,matcher URxvt.urlLauncher: /usr/bin/gnome-open     
URxvt.matcher.button: 1 URxvt.matcher.pattern.1: /.*

(and executing xrdb -load ~/.Xdefaults afterwards)

6
  • 1
    I think this answer should be accepted. rlocate itself makes a complete answer already. Commented Feb 20, 2012 at 15:17
  • 6
    What's up in 2017? rlocate mentions Linux 2.6 and no Ubuntu 16.04 package. recoll seems interesting and updated, though overkill for my need. doodle has Ubuntu package as of 16.04 so might be an option. Commented Mar 19, 2017 at 17:49
  • Why is recoll an overkill, you can also run recoll from the commandline. It also integrates well with kde and unity if you want. Commented Mar 19, 2017 at 18:59
  • My biggest issue with catfish is inability to interact with files - if I want to copy 20 files from the search results I need to Show in File Manager 20 times. Commented May 26, 2017 at 14:20
  • 1
    Does rlocate index the content of a file? If not, the question is still not answered. Commented Jul 30, 2023 at 20:31
12

I was also searching for the "Search Everything" tool for linux and discovered "Search Monkey" in the Ubuntu repository. LOVE IT!

It's light weight, loads quick, wild card searches produces tons of results instantly, plus it has filters and advanced search methods.

I now have my "Everything" search tool back for linux!

2
  • 2
    Does it have a command line interface? Commented Apr 3, 2021 at 22:00
  • Sadly, it does not seem to be indexed. Commented May 1, 2024 at 13:08
9

Interesting idea to implement this rooted within the filesystem, but nothing like that exists to my knowledge. Apart from a few add-ons trying to burrow themselves deep enough into the upper fs layers to get an early hold on data (Update: Everything falls into this cathegory itself), I'm afraid you're limited to the less satisfying processes of regular indexing.

What might come closest to what you're looking for might be the libferris virtual filesystem.

In the indexing world, you might want to take a look at glimpse, which at least is able to update and append its index.

Update: I just read the stuff about "Everything", and it doesn't seem to be inherent to the FS either, so libferris isn't that far off, plus it also allows to index content, not just filenames. It does satisfy your need of being up-to-date at all times.

1
  • 2
    Ferris mailing list dried up since 2007 and do not continue beyond 2010. There's a github repository that was not active between mi-2016 and March 2017 github.com/monkeyiq/ferris/commits/master . Perhaps it continues. Commented Mar 19, 2017 at 17:39
9

I know that this answer is really late, but this might help someone else, especially since there is no real solution till now to this problem.

Linux kernel 5.1 Introduced a kernel API called 'fanotify', which allows recursive directory watches for monitoring creations/deletions/moves, etc. ...

... and there are some tools that started to leverage (or at least testing). To create a search engine that is always up to date like: gosearch, Tracker and lolcate-rs.

5

btrfs has implemented the find-new command against subvolumes for years. If you keep a relatively up-to-date snapshot tree, it can be used to atomically watch a filesystem for all changes with little fuss.

You would use it like:

btrfs sub find-new /chk/path [gen-id]

You can get the gen-id you need for comparison with the same command, but using a bogus gen-id. There is more info here.

5

I am using Angry Search on a Raspberry Pi 3 B+ running Stretch and it works fine. It is really quite fast just like Search Everything on windows. It is very nice to be able to find files so quickly.

5

There are other solutions like Angry Search, however, I like FSearch the most.

Please note that, Everything monitors file systems for all changes. Your search results will update in real-time to reflect any changes. Everything keeps NTFS indexes up to date with the NTFS USN Journal. This functionality (search results update in real-time to reflect any changes) needs Windows specific features that is missing in Linux. For more details please check here. Being said that, In FSearch, to update index (not real-time), press Ctrl+Shift+R. There is also a option to automatically update index every time you start FSearch.

Solution 2:

If you are into cli and scripting, I have a script that combine plocate (please note that it is neither locate nor mlocate) and rofi. It uses gnu parallel to improve performance. It opens the selected file in Nemo file browser. You can use this for educational purpose. If you want to use, you have to customize it to match your needs.

#!/usr/bin/env bash

shopt -s lastpipe

indexDirectory1() {
    updatedb -l 0 --database-root /media/ismail/8TBRaid0 --prunepaths /media/ismail/8TBRaid0/_Backup --prunenames ".Trash-1000 lost+found .git objects" --output $HOME/plocate_8TBRaid0.db
}

indexDirectory2() {
    updatedb -l 0 --database-root /media/ismail/SSDWorking/_Working --prunenames ".git" --output $HOME/plocate_SSDWorking_Working.db
}

export -f indexDirectory1
export -f indexDirectory2

parallel -j3 ::: indexDirectory1 indexDirectory2

indexDirectoryCombine1 () {
    plocate -A --ignore-case --database $HOME/plocate_8TBRaid0.db \*
}

indexDirectoryCombine2() {
    plocate -A --ignore-case --database $HOME/plocate_SSDWorking_Working.db \*
}

export -f indexDirectoryCombine1
export -f indexDirectoryCombine2

parallel  --keep-order -j3 ::: indexDirectoryCombine1 indexDirectoryCombine2 | rofi -dmenu -i -theme-str 'window {fullscreen:true;}' | read select

if [ ${PIPESTATUS[1]} -eq 0 ]; then
    nemo "$select"
fi

Solution 3:

You can also try File Browser mode of rofi. It renders icon which my script does not. However, it is not as customizable as my script. For example, i used --prunepaths, --prunenames and also used --database-root to add multiple folders. It was not possible earlier in rofi. Not sure about the current state. If it is possible now then please let me know in the comment section. I had a discussion with the author of rofi a while back. He was very helpful regarding these issues. You can find more about it here.

1
  • 1
    Considering how many search results you get pointing to FSearch when you google for Evernote alternative for Linux, I'm surprised you are the only one who posted it here. Commented Oct 28, 2018 at 16:56
4

You can use locate command and if you want update its database run the following command:

# updatedb

This command update the locate database in a few seconds

2
  • interactive sample implementation: github.com/phil294/linux-locate-everything Commented Dec 26, 2016 at 12:17
  • It might be a few seconds on your small system but on my multiterrabyte system it's minutes or even hours Commented Dec 4, 2021 at 20:50
2

FSearch, which is inspired by by Everything Search Engine.

1

It should be possible to build something like this in a few lines of code using inotify (there's also the inotify-tools package which would allow you to implement this using shell scripts).

(I'd be very surprised that any such tool would be driven from the journal - more likely it's implemented in the virtual filesystem tier)

1
  • 2
    I'm unsure if inotify could be useful here as it's not recursive. Creating watches for the whole tree is simple, but can the kernel handle many tens of thousands of them? Even if it can, this doesn't look as an effective way to me. Commented Feb 8, 2012 at 3:33
1

You might want to try beagle. Unfortunately http://www.beagle-project.org is now parked domain - wikipedia.

1

UI front-end for locate command that works almost the same as Everything :

https://github.com/AlexTuduran/Locator/releases

4
  • 1
    This appears to be built on the false premise that locate is never updated automatically. Commented Jun 23, 2015 at 13:14
  • Please develop. What do you mean by locate being updated? Commented Sep 11, 2015 at 11:03
  • Your GitHub project states that the Unix command locate uses the same principle, except that the database is not updated automatically. The locate package includes a cron task that does automatically update the database. Commented Sep 11, 2015 at 13:11
  • If that's true, then it's only helping the goal of the tool. Having the database updated automatically off-loads the user from doing another task. The user still can update the database explicitly if needs immediate updates. Or what is the concern here regarding the false premise? Commented Feb 17, 2016 at 11:16
0

Depending on your actual use cases, you could use IntelliJ IDEA, free Community Edition. https://www.jetbrains.com/idea/download/#section=linux

If you don't really need to search the entire disk (which I doubt), but rather sets of files (projects), then you can open any directory as a project, and search with Ctrl + Shift + F . IDEA keeps an up-to-date index all the time.

This may be a bit overkill just for the searching, but if your files are text and you also read and edit them, then you should give it a try.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.