{"id":13395493,"url":"https://github.com/jhspetersson/fselect","last_synced_at":"2025-05-16T01:03:35.389Z","repository":{"id":38454699,"uuid":"119048105","full_name":"jhspetersson/fselect","owner":"jhspetersson","description":"Find files with SQL-like queries","archived":false,"fork":false,"pushed_at":"2025-05-15T07:39:10.000Z","size":1294,"stargazers_count":4177,"open_issues_count":12,"forks_count":87,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-05-16T01:01:53.509Z","etag":null,"topics":["cli","command-line","files","filesystem","find","hacktoberfest","query","rust","sql","sql-like","tool","utility"],"latest_commit_sha":null,"homepage":"https://fselect.rocks","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhspetersson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-01-26T12:17:59.000Z","updated_at":"2025-05-15T07:01:46.000Z","dependencies_parsed_at":"2023-09-29T16:30:23.369Z","dependency_job_id":"1505dd43-ac45-4043-b214-914368b15e02","html_url":"https://github.com/jhspetersson/fselect","commit_stats":{"total_commits":849,"total_committers":24,"mean_commits":35.375,"dds":0.07302709069493518,"last_synced_commit":"1d138eee8f66210f50e20dc74d091b964d2b2004"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhspetersson%2Ffselect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhspetersson%2Ffselect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhspetersson%2Ffselect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhspetersson%2Ffselect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhspetersson","download_url":"https://codeload.github.com/jhspetersson/fselect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448579,"owners_count":22072764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","files","filesystem","find","hacktoberfest","query","rust","sql","sql-like","tool","utility"],"created_at":"2024-07-30T17:02:02.270Z","updated_at":"2025-05-16T01:03:30.357Z","avatar_url":"https://github.com/jhspetersson.png","language":"Rust","readme":"# fselect\nFind files with SQL-like queries\n\n[![Crates.io](https://img.shields.io/crates/v/fselect.svg)](https://crates.io/crates/fselect)\n[![build](https://github.com/jhspetersson/fselect/actions/workflows/rust.yml/badge.svg)](https://github.com/jhspetersson/fselect/actions/workflows/rust.yml)\n\n### Why use fselect?\n\nWhile it doesn't tend to fully replace traditional `find` and `ls`, **fselect** has these nice features:\n\n* SQL-like (not real SQL, but highly relaxed!) grammar easily understandable by humans\n* complex queries\n* aggregate, statistics, date, and other functions\n* search within archives\n* `.gitignore`, `.hgignore`, and `.dockerignore` support (experimental)\n* search by width and height of images, EXIF metadata\n* search by MP3 info\n* search by extended file attributes and Linux capabilities\n* search by file hashes\n* search by MIME type\n* shortcuts to common file types\n* interactive mode\n* various output formatting (CSV, JSON, and others)\n\nMore is under way!\n\n### Installation\n\n#### Latest release from source\n\n* Install [Rust with Cargo](https://www.rust-lang.org/en-US/install.html) and its dependencies to build a binary\n* Run `cargo install fselect`\n\n#### Arch Linux\n\n[AUR package](https://aur.archlinux.org/packages/fselect/), thanks to [@asm0dey](https://github.com/asm0dey)\n\n[AUR bin package](https://aur.archlinux.org/packages/fselect-bin/), thanks to [@4censord](https://github.com/4censord)\n\n#### NixOS\n\n[`fselect` in `nixpkgs`](https://github.com/filalex77/nixpkgs/blob/1eced92263395896c10cea69e5f60e8be5f43aeb/pkgs/tools/misc/fselect/default.nix), thanks to [@filalex77](https://github.com/filalex77)\n\n#### Other Linux\n\n[Static build with musl](https://github.com/jhspetersson/fselect/releases/download/0.8.11/fselect-x86_64-linux-musl.gz).\n\n#### Windows 64bit\n\nA statically precompiled [binary](https://github.com/jhspetersson/fselect/releases/download/0.8.11/fselect-x86_64-win.zip) is available at GitHub downloads.\n\n#### Windows via winget\n\n* Install [winget](https://github.com/microsoft/winget-cli)\n* Run `winget install -e --id fselect.fselect`\n\n#### Windows via Chocolatey\n\n* Install [Chocolatey](https://chocolatey.org/install)\n* Run `choco install fselect`\n\n#### Windows via Scoop\n\n* Install [Scoop](https://scoop.sh)\n* Run `scoop install fselect`\n\n#### Mac via Homebrew\n\n* Install [brew](https://brew.sh)\n* Run `brew install fselect`\n\n#### Mac via MacPorts\n\n* Install [MacPorts](https://www.macports.org)\n* Run:\n  ```\n  sudo port selfupdate\n  sudo port install fselect\n  ```\n\n### Usage\n\n    fselect [ARGS] COLUMN[, COLUMN...] [from ROOT[, ROOT...]] [where EXPR] [group by COLUMNS] [order by COLUMNS] [limit N] [into FORMAT]\n\n### Interactive mode\n\n    fselect -i\n\n### Documentation\n\n[More detailed description. Look at examples first.](docs/usage.md)\n\n### Examples\n\nFind temporary or config files (full path and size):\n\n    fselect size, path from /home/user where name = '*.cfg' or name = '*.tmp'\n    \nWindows users may omit the quotes:\n\n    fselect size, path from C:\\Users\\user where name = *.cfg or name = *.tmp\n\nOr put all the arguments into the quotes like this:\n\n    fselect \"name from /home/user/tmp where size \u003e 0\"\n\nSearch within a directory name with spaces (backticks are also supported):\n\n    fselect \"name from '/home/user/dir with spaces' where size \u003e 0\"\n    fselect \"name from `/home/user/dir with spaces` where size \u003e 0\"\n\nOr simply escape the single quote:\n\n    fselect name from \\'/home/user/dir with spaces\\' where size gt 0\n\nSpecify the file size, get an absolute path, and add it to the results:\n\n    cd /home/user\n    fselect size, abspath from ./tmp where size gt 2g\n    fselect fsize, abspath from ./tmp where size = 5m\n    fselect hsize, abspath from ./tmp where size lt 8k\n    fselect name, size from ./tmp where size between 5mb and 6mb\n    \nMore complex query:\n\n    fselect \"name from /tmp where (name = *.tmp and size = 0) or (name = *.cfg and size \u003e 1000000)\"\n    \nAggregate functions (you can use curly braces if you want and even combine them with the regular parentheses):\n\n    fselect \"MIN(size), MAX{size}, AVG(size), SUM{size}, COUNT(*) from /home/user/Downloads\"\n    \nFormatting functions:\n\n    fselect \"LOWER(name), UPPER(name), LENGTH(name), YEAR(modified) from /home/user/Downloads\"\n    \nGet the year of the oldest file:\n\n    fselect \"MIN(YEAR(modified)) from /home/user\"\n    \nUse single quotes if you need to address files with spaces:\n\n    fselect \"path from '/home/user/Misc stuff' where name != 'Some file'\"\n    \nRegular expressions of [Rust flavor](https://docs.rs/regex/1.1.0/regex/#syntax) are supported:\n\n    fselect name from /home/user where path =~ '.*Rust.*'\n    \nNegate regular expressions:\n\n    fselect \"name from . where path !=~ '^\\./config'\"\n    \nSimple globs expand automatically and work with `=` and `!=` operators:\n\n    fselect name from /home/user where path = '*Rust*'\n    \nClassic LIKE:\n\n    fselect \"path from /home/user where name like '%report-2018-__-__???'\"\n    \nExact match operators to search with regexps disabled:\n\n    fselect \"path from /home/user where name === 'some_*_weird_*_name'\"\n    \nFind files by date:\n\n    fselect path from /home/user where created = 2017-05-01\n    fselect path from /home/user where modified = today\n    fselect path from /home/user where accessed = yesterday\n    fselect \"path from /home/user where modified = 'apr 1'\"\n    fselect \"path from /home/user where modified = 'last fri'\"\n    \nBe more specific to match all files created at an interval between 3PM and 4PM:\n\n    fselect path from /home/user where created = '2017-05-01 15'\n    \nAnd even more specific:\n\n    fselect path from /home/user where created = '2017-05-01 15:10'\n    fselect path from /home/user where created = '2017-05-01 15:10:30'\n    \nDate and time intervals are possible (find everything updated since May 1st):\n\n    fselect path from /home/user where modified gte 2017-05-01\n    \nDefault is the current directory:\n\n    fselect path, size where name = '*.jpg'\n    \nSearch within multiple locations:\n\n    fselect path from /home/user/oldstuff, /home/user/newstuff where name = '*.jpg'\n    \nWith minimum and/or maximum depth specified (`depth` is a synonym for `maxdepth`):\n\n    fselect path from /home/user/oldstuff depth 5 where name = '*.jpg'\n    fselect path from /home/user/oldstuff mindepth 2 maxdepth 5, /home/user/newstuff depth 10 where name = '*.jpg'\n\nOptionally follow symlinks:\n\n    fselect path, size from /home/user symlinks where name = '*.jpg'\n    \nSearch within archives (currently only zip-archives are supported):\n\n    fselect path, size from /home/user archives where name = '*.jpg'\n    \nOr in combination:\n\n    fselect size, path from /home/user depth 5 archives symlinks where name = '*.jpg' limit 100\n\nEnable `.gitignore` or `.hgignore` support:\n\n    fselect size, path from /home/user/projects gitignore where name = '*.cpp'\n    fselect size, path from /home/user/projects git where name = '*.cpp'    \n    fselect size, path from /home/user/projects hgignore where name = '*.py'        \n    \nSearch by image dimensions:\n\n    fselect CONCAT(width, 'x', height), path from /home/user/photos where width gte 2000 or height gte 2000\n    \nFind square images:\n    \n    fselect path from /home/user/Photos where width = height\n\nFind images with a known name part but unknown extension:\n    \n    fselect path from /home/user/projects where name = \"*RDS*\" and width gte 1\n\nFind old-school rap MP3 files:\n\n    fselect duration, path from /home/user/music where genre = Rap and bitrate = 320 and mp3_year lt 2000  \n    \nShortcuts to common file extensions:\n\n    fselect path from /home/user where is_archive = true\n    fselect path, mime from /home/user where is_audio = 1\n    fselect path, mime from /home/user where is_book != false\n\nEven simpler way of using boolean columns:\n\n    fselect path from /home/user where is_doc\n    fselect path from /home/user where is_image\n    fselect path from /home/user where is_video\n    \nFind files with dangerous permissions:\n    \n    fselect mode, path from /home/user where other_write or other_exec\n    fselect mode, path from /home/user where other_all\n    \nSimple glob-like expressions or even regular expressions in file mode are possible:\n    \n    fselect mode, path from /home/user where mode = '*rwx'\n    fselect mode, path from /home/user where mode =~ '.*rwx$'\n    \nFind files by owner's uid or gid:\n\n    fselect uid, gid, path from /home/user where uid != 1000 or gid != 1000\n    \nOr by owner's or group's name:\n\n    fselect user, group, path from /home/user where user = mike or group = mike\n\nFind special files:\n\n    fselect name from /usr/bin where suid\n    fselect path from /tmp where is_pipe\n    fselect path from /tmp where is_socket\n    \nFind files with xattrs, check if a particular xattr exists, or get its value:\n\n    fselect \"path, has_xattrs, has_xattr(user.test), xattr(user.test) from /home/user\"\n    \nInclude arbitrary text as columns:\n\n    fselect \"name, ' has size of ', size, ' bytes'\"\n\nGroup results:\n\n    fselect \"ext, count(*) from /tmp group by ext\"            \n\nOrder results:\n\n    fselect path from /tmp order by size desc, name\n    fselect modified, fsize, path from ~ order by 1 desc, 3\n    \nFinally, limit the results:\n\n    fselect name from /home/user/samples limit 5 \n    \nFormat output:\n\n    fselect size, path from /home/user limit 5 into json\n    fselect size, path from /home/user limit 5 into csv\n    fselect size, path from /home/user limit 5 into html\n\n### License\n\nMIT/Apache-2.0\n\n---\n\nSupported by [JetBrains IDEA](https://jb.gg/OpenSourceSupport) open source license\n","funding_links":[],"categories":["Rust","HarmonyOS","Applications","Files and Directories","Command Line","Utilities","Command-Line Productivity","\\*nix/\\*nux","Tools and Plugins","cli","命令行工具","Developer Tools","FileSystem"],"sub_categories":["Windows Manager","Utilities","Search","Dependency Management","Email","System tools","Searching","Windows","🛠️ Utilities (79)","Command Line Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhspetersson%2Ffselect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhspetersson%2Ffselect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhspetersson%2Ffselect/lists"}