fselect - Search your local files using (relaxed) SQL syntax!
Posted: Sun Nov 15, 2020 5:55 am
One-liner: Find files with SQL-like queries
Description:
The beauty of this incredible tool is the combinations and the functions:
fselect.exe select sha1, name from . where modified gt 2020-10-21 and is_file=1 and len(name) lt 10 :
get me all css files between 2-5 MB modified yesterday that contain the string "min-width"!
Note that I don't have to choose "from folder" (assumed to be current folder). Also notices the various ways you can write greater/lesser than, date, units, etc.
The query can be as short as fselect name or fselect name,size To list names and sizes of files in the current directory.
Site: https://github.com/jhspetersson/fselect
Size: < 3MB
Entry: Link.
Description:
Why use fselect?
While it doesn't tend to fully replace traditional find and ls, fselect has these nice features:
- SQL-like (not real SQL, but highly relaxed!) grammar easily understandable by humans
- complex queries
- aggregate, statistics, date, and other functions
- search within archives
- .gitignore, .hgignore, and .dockerignore support (experimental)
- search by width and height of images, EXIF metadata
- search by MP3 info
- search by extended file attributes
- search by file hashes
- search by MIME type
- shortcuts to common file types
- interactive mode
- various output formatting (CSV, JSON, and others)
The beauty of this incredible tool is the combinations and the functions:
fselect.exe select sha1, name from . where modified gt 2020-10-21 and is_file=1 and len(name) lt 10 :
- Output = name and sha1 sum
- From current folder (.)
- certain last modified date
- Only files (no folders)
- Only names > 10 characters long!
get me all css files between 2-5 MB modified yesterday that contain the string "min-width"!
Code: Select all
fselect name where name=*.css and size gt 2m and "size<5mb" and modified=yesterday and contains(min-width)
The query can be as short as fselect name or fselect name,size To list names and sizes of files in the current directory.
Site: https://github.com/jhspetersson/fselect
Size: < 3MB
Entry: Link.