{"id":19150566,"url":"https://github.com/night-crawler/fgr","last_synced_at":"2026-03-02T21:08:26.030Z","repository":{"id":65517166,"uuid":"554727592","full_name":"night-crawler/fgr","owner":"night-crawler","description":"Find \u0026 GRep program","archived":false,"fork":false,"pushed_at":"2024-04-30T11:45:03.000Z","size":147,"stargazers_count":18,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T22:20:36.419Z","etag":null,"topics":["find","grep","query","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/night-crawler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-10-20T09:39:19.000Z","updated_at":"2024-04-30T11:45:05.000Z","dependencies_parsed_at":"2024-05-05T22:31:14.155Z","dependency_job_id":null,"html_url":"https://github.com/night-crawler/fgr","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"4fefe23664c12b3beb39acc341d932f64fb534e5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-crawler%2Ffgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-crawler%2Ffgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-crawler%2Ffgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-crawler%2Ffgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/night-crawler","download_url":"https://codeload.github.com/night-crawler/fgr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252819360,"owners_count":21809012,"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":["find","grep","query","rust"],"created_at":"2024-11-09T08:12:19.772Z","updated_at":"2026-03-02T21:08:25.978Z","avatar_url":"https://github.com/night-crawler.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fgr\n\n[![Rust](https://github.com/night-crawler/fgr/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/night-crawler/fgr/actions/workflows/main.yml)\n[![crates.io](https://img.shields.io/crates/v/fgr-rs.svg)](https://crates.io/crates/fgr-rs)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nFind \u0026 Grep utility with SQL-like query language.\n\n## Examples\n\n```bash\n# Find all files with name equal to sample under the current directory:\nfgr -e name=sample\n\n# Find files with containing 's' and 777 permissions:\nfgr /home /bin -e 'name=*s* and perm=777'\n\n# Find files with name containing SAMPLE\nfgr /home -e 'name=\"*SAMPLE*\"'\n\n# Find files with name containing SAMPLE ignore case\nfgr /home -e 'name=i\"*SAMPLE*\"'\n\n# Find files with name containing SAMPLE (regex)\nfgr /home -e 'name=r\".+SAMPLE.+\"'\n\n# Find files with name containing SAMPLE ignore case (regex)\nfgr /home -e 'name=ri\".+SAMPLE.+\"'\n\n# Find files under the /bin directory not owned by root:\nfgr /bin -e 'user \u003e 0'\n\n# Find files under the /bin directory having suid bit (but not limited to):\nfgr /bin -e 'perms\u003e4000'\n\n# Find recently accessed files (but not in future):\nfgr /home -e 'atime \u003e now - 1h and atime \u003c now'\n\n# Find stuff in files:\nfgr /home -e 'type=text and contains=*stuff*'\n\n# Other examples:\nfgr /home /bin -e 'name=*s* and perm=777 or (name=*rs and contains=r\".+user.is_birthday.*\")'\nfgr /home /bin -e 'name=*s* and perm=777 or (name=*rs and contains=*birth*)'\nfgr /home /bin -e 'ext=so and mtime \u003e= now - 1d'\nfgr /home -e 'size\u003e=1Mb and name != *.rs and type=vid'\n\n# xargs \u0026 -print0 support\nfgr /home -e 'perms=777' -p | xargs -0 -n1 | sort\n\n```\n\n## Features\n \n - Filter files by:\n   - Size\n   - Depth\n   - Type (text, app, archive, audio, book, doc, font, img, vid)\n   - atime, mtime\n   - name, extension\n   - contents\n   - user, group, permissions\n - Timeout IO operations (does not hang parsing files like `/sys/kernel/security/apparmor/revision`) \n - Regex \u0026 Glob name matching\n - Regex \u0026 Glob contents matching\n - Nexted expressions\n - Human-readable atime/mtime search patterns\n - `.ignore` support, thanks to [ignore](https://docs.rs/ignore/latest/ignore/) crate\n\n## Speed\n\nBy default, it acts like the `find` and visits all directories.\nSearch by name is quite fast\n\n```bash\ndu -h /home\n# 98G     /home\n# About 100G of .gradle, caches and all the whatnot\n\nsudo sh -c 'echo 1 \u003e/proc/sys/vm/drop_caches'\nsudo sh -c 'echo 2 \u003e/proc/sys/vm/drop_caches'\nsudo sh -c 'echo 3 \u003e/proc/sys/vm/drop_caches'\n\nfgr /home -e 'name=*sample*' # 1.09s user 2.70s system 169% cpu 2.239 total\n\nsudo sh -c 'echo 1 \u003e/proc/sys/vm/drop_caches'\nsudo sh -c 'echo 2 \u003e/proc/sys/vm/drop_caches'\nsudo sh -c 'echo 3 \u003e/proc/sys/vm/drop_caches'\n\nfind /home -name '*sample*' # 0.71s user 2.09s system 12% cpu 22.156 total\n```\n\n## TODO\n\n- [x] Query precedence evaluation\n- [ ] Run command\n- [ ] Exclude patterns \u0026 default exclude patterns (handling `/proc/**/pagemap` scenarios)\n- [x] Binary/Text type detector\n- [x] Ignore case searches\n- [ ] Error printing\n- [ ] Documentation\n- [ ] AUR\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-crawler%2Ffgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnight-crawler%2Ffgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-crawler%2Ffgr/lists"}