Crates.io | bfind |
lib.rs | bfind |
version | 0.0.4 |
source | src |
created_at | 2024-08-26 13:35:31.924265 |
updated_at | 2024-08-27 05:42:48.834937 |
description | A GNU Find-like tool, but uses breadth-first search instead of depth-first search |
homepage | |
repository | https://github.com/brglng/bfind |
max_upload_size | |
id | 1352230 |
size | 46,387 |
A GNU Find-like tool, but uses breadth-first search instead of depth-first search, written in Rust.
NO WARRANTY: I make this tool mainly for my personal use. I have no plan to improve its performance or features, neither are issues guaranteed to get fixed. However, PR is welcome.
$ cargo build
Or for the release version
$ cargo build --release
$ cargo install --path .
NOTE: Currently, only basic directory listing is implemented.
List current working directory:
$ bfind
List a specific directory:
$ bfind /path/to/directory
Find a file with regular expression:
$ bfind . -- name match 'foo.*'
Find a file with glob:
$ bfind . -- name glob 'foo*'
Combining conditions:
$ bfind . -- name glob 'foo*' and type is dir
Print with formatting:
$ bfind . print 'file: {name:10}, {size:>10} bytes' -- name glob 'foo*' and size gt 1MiB
Execute a command:
$ bfind . exec cat '{fullpath}' -- name glob 'foo*.txt'