Re: [arch-general] inotify and locate

2012-02-26 Thread Mantas M.
On Sun, Feb 26, 2012 at 11:49:55AM +, Andrea Crotti wrote:
> It's a bit a shame that there isn't any default good indexing system
> for Linux.
> Now there is also a inotify implementation and tools to set up
> watchers on the filesystem,
> so why are we still mainly stuck with locate and the expensive updatedb?
> 
> Are there other problems with the inotify approach maybe or just
> lack of developer interest?

One problem with inotify is that it, AFAIK, requires adding each and every 
directory separately to the inotify watch, which just doesn't work with the 
entire /home, much less /.

Fanotify can watch entire trees easily, but is a root-only API for now.

-- 
Mantas Mikulėnas 


Re: [arch-general] inotify and locate

2012-02-26 Thread Tom Gundersen
On Sun, Feb 26, 2012 at 12:49 PM, Andrea Crotti
 wrote:
> It's a bit a shame that there isn't any default good indexing system for
> Linux.
> Now there is also a inotify implementation and tools to set up watchers on
> the filesystem,
> so why are we still mainly stuck with locate and the expensive updatedb?
>
> Are there other problems with the inotify approach maybe or just lack of
> developer interest?

Both KDE (strigi) and Gnome (tracker) have indexers that use inotify.
They are obviously different in focus from locate, but maybe they are
worth investigating if you want something to build on.

Cheers,

Tom


Re: [arch-general] inotify and locate

2012-02-26 Thread Andrea Crotti

On 02/26/2012 12:23 PM, Calvin Morrison wrote:

It is only for Linux. That was my barrier. It has no portability to Mac or
BSDs. It is a great tool and really comes in handy.

There is an package called inotify-tools that does some basic watching.
I've used it in the past.

Calvin



Well mac has already spotlight, and BSD probably has some other ways.
If you want something fast there it must run in the kernel, so it's very 
hard to have

something multi-plaform.

This python project is multi-platform in theory, 
http://pypi.python.org/pypi/watchdog,
(and uses inotify on Linux) but it's not designed exactly with this 
intent IMHO.


Re: [arch-general] inotify and locate

2012-02-26 Thread Andrea Crotti

On 02/26/2012 12:18 PM, Raven wrote:
On Sun, 26 Feb 2012 19:49:55 +0800, Andrea Crotti 
 wrote:


It's a bit a shame that there isn't any default good indexing system 
for Linux.
Now there is also a inotify implementation and tools to set up 
watchers on the filesystem,

so why are we still mainly stuck with locate and the expensive updatedb?

Are there other problems with the inotify approach maybe or just lack 
of developer interest?


Great idea, though I thought inotify doesn't suit this task. For 
updatedb, it should call inotify_watch for every file on the 
filesystem, that's quite inefficient.


I think Linux's audit system could do this, though.


Well I don't mean to integrate directly updatedb and locate, I mean a 
new tool that uses the inotify api.
The efficiency might be a problem sure, but if you filter well only on 
the paths and the files that you
actually need I don't think it would be too bad, after all inotify is in 
the kernel.


How would the audit system be better? And what do you mean exactly?


Re: [arch-general] inotify and locate

2012-02-26 Thread Calvin Morrison
It is only for Linux. That was my barrier. It has no portability to Mac or
BSDs. It is a great tool and really comes in handy.

There is an package called inotify-tools that does some basic watching.
I've used it in the past.

Calvin
On Feb 26, 2012 6:50 AM, "Andrea Crotti"  wrote:

> It's a bit a shame that there isn't any default good indexing system for
> Linux.
> Now there is also a inotify implementation and tools to set up watchers on
> the filesystem,
> so why are we still mainly stuck with locate and the expensive updatedb?
>
> Are there other problems with the inotify approach maybe or just lack of
> developer interest?
>


Re: [arch-general] inotify and locate

2012-02-26 Thread Raven
On Sun, 26 Feb 2012 19:49:55 +0800, Andrea Crotti  
 wrote:


It's a bit a shame that there isn't any default good indexing system for  
Linux.
Now there is also a inotify implementation and tools to set up watchers  
on the filesystem,

so why are we still mainly stuck with locate and the expensive updatedb?

Are there other problems with the inotify approach maybe or just lack of  
developer interest?


Great idea, though I thought inotify doesn't suit this task. For updatedb,  
it should call inotify_watch for every file on the filesystem, that's  
quite inefficient.


I think Linux's audit system could do this, though.


[arch-general] inotify and locate

2012-02-26 Thread Andrea Crotti
It's a bit a shame that there isn't any default good indexing system for 
Linux.
Now there is also a inotify implementation and tools to set up watchers 
on the filesystem,

so why are we still mainly stuck with locate and the expensive updatedb?

Are there other problems with the inotify approach maybe or just lack of 
developer interest?