Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Scripts for managing media

Project description


A simple python utility that indexes directory and file names in a sqlite database to allow for fast searching.

Definitely check out locate before considering this tool.


pip install search-fs


create-search-fs --help
search-fs --help

Create the database

create-search-fs dir1/ dir2/


Search anywhere for JPG files

search-fs --name '*.jpg'

Search just one directory tree for JPG files

search-fs --name '*.jpg' dir1/

Search just one directory and not any of the sub directories for JPG files

search-fs --name '*.jpg' dir1/ --strict-dir

Search for directories

search-fs --name 'Directory*' --type d

Search for files by size

search-fs --size '500M' #Files larger than 500MB
search-fs --size='-10M' #Files smaller than 10MB, Note: make sure you use use '--size=' for less than


You can setup a cronjob to run create-search-fs so that the index is up to date.

Create dirs.txt which contains the directories to index

#Lines starting with # are ignored

Add line with crontab -e to update the index every hour

0 * * * * /usr/local/bin/create-search-fs --dirs /path/to/dirs.txt

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for search-fs, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size search_fs-0.0.3-py3-none-any.whl (9.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size search-fs-0.0.3.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page