1 unstable release
0.1.0 | Oct 21, 2023 |
---|
#1471 in Filesystem
37KB
830 lines
detect: a command line tool for finding filesystem entities using expressions
➜ detect 'executable() && filename(detect) ||
extension(.rs) && contains(map_frame)'
./target/release/detect
./target/release/deps/detect-6395eb2c29a3ed5e
./target/debug/detect
./target/debug/deps/detect-34cec1d5ea27ff11
./target/debug/deps/detect-e91a01500af9a97b
./target/debug/deps/detect-0b57d7084445c8b2
./target/debug/deps/detect-32c3beb592fdbbe3
./src/expr/frame.rs
operators
a && b
a || b
!a
(a)
file path predicates
filename($REGEX)
: file namefilepath($REGEX)
: file pathextension($STRING)
exact match on extension
metadata predicates
dir()
: is direxecutable()
: is executablesize(n1..n2)
/size(..n)
/size(n..)
: file size in range, supports1kb
,1mb
, etc
file contents predicates
contains($REGEX)
: file contentsutf8()
: file contents are utf8
Dependencies
~9–19MB
~225K SLoC