Skip to content

Filement Index is a simple collection of tools for indexed search and file metadata lookup.

License

Notifications You must be signed in to change notification settings

martinkunev/findex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# FILEMENT INDEX

Filement Index is a simple collection of tools for indexed search and file metadata lookup. It uses a file-based database. It consists of three applications:
findex - Traverses the filesystem and stores file metadata in the database.
ffind - Finds files in the database, based on filtering criteria. Uses interface similar to that of find(1).
ffile - Displays information about files by using the database.

Filement Index is in an early stage of development and a lot of things need improvement. The format of the database will probably change in the future.

Filement Index is created to solve several problems:
* overcome the problems of tools like locate and slocate
- locate is prone to privilege escalation attacks because it runs with SUID
- locate is designed only as a tool for users - an application cannot access locate's database
- locate provides only filename information and supports only search by filename
- regular users can't update the database of locate
* provide a database for fast lookup of file information
	File type must be recognized by file contents. This can be done once and stored in a database for future lookup. If you are interested in the reasoning that led me to that conclusion, read the manifesto.

The database of Filement Index can be useful for the following types of applications:
* search tools
* file managers
* servers that need fast lookup of file information (e.g. http server)

Filement Index is distributed under the terms of the license GNU GPL version 3 <http://gnu.org/licenses/gpl.html>.

## INSTALL

$ ./configure
$ make
# make install

You can specify --prefix=<path> to configure in order to change the install location (the default is /usr/local/).

You can use cron to make findex run every once in a while. The following will make findex to be run every night at 4:02 a.m. on the user's home directory:
$ crontab -e
2 4 * * * nice findex "$HOME"

## UNINSTALL

# make uninstall

This will leave the Filement Index database. It can be deleted manually from the user's home directory:
$ rm ~/.cache/filement

## USAGE

Use findex to create a database with file information. You must specify what directories to be indexed (typically this would be your user's home directory). Depending on the number of files this can take from several seconds to several minutes.
The database is user-specific. This means that each user must run findex on the files they want indexed.

Once the database exists, you can use ffind to find files in it. The syntax of ffind is similar to that of find. ffind searches only in the database (not in the filesystem). See ffind(1) for more information.

## NOTES

For each indexed file, the database stores the following information:
path	Absolute path to the file.
content	Information about file contents.
mime	MIME type of the file.
mtime	Time of last modification.
size	File size in bytes.

File type (content) recognition is in an early stage of development. Work is done to improve it.

About

Filement Index is a simple collection of tools for indexed search and file metadata lookup.

Resources

License

Stars

Watchers

Forks

Packages

No packages published