search-fs
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.
Installation
pip install search-fs
Usage
create-search-fs --help
search-fs --help
Create the database
create-search-fs dir1/ dir2/
Search
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
Search by regular expression
search-fs --regex '\w+\d\d?\.jpg'
Format the output
search-fs --name '*.jpg' --format=size,name
Cron
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
/path/dir1
/other/dir2
Add line with crontab -e to update the index every hour
0 * * * * /usr/local/bin/create-search-fs --dirs /path/to/dirs.txt
Metadata
Release files for search-fs 0.0.6.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| search-fs-0.0.6.post1.tar.gz | 8.9 kB | Without provenance | Details for search-fs-0.0.6.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| search_fs-0.0.6.post1-py3-none-any.whl | Python 3 | none | any | Details for search_fs-0.0.6.post1-py3-none-any.whl |
Total release size: 19.7 kB
Release files / search-fs-0.0.6.post1.tar.gz
| Download URL | search-fs-0.0.6.post1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e15659a2bb5b381572f88c0a3f028b766e8795be38c27bc2fb0850a8ba2cc477
|
|
BLAKE2b-256 checksum How to use checksums |
dcf7df4fd9b5d1842660265bb41cac26b2190ea4b320546f19e9cde94a59217d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / search_fs-0.0.6.post1-py3-none-any.whl
| Download URL | search_fs-0.0.6.post1-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9242a1571778bb6a663bdb8e642fb2091a20ba025d4e8f8de568e7a5fa42c20
|
|
BLAKE2b-256 checksum How to use checksums |
7e0e708923440320c64f8c6af2636a2fcf6310a2d755703ad8c4886d3af1d8c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for search-fs 0.0.6.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.