This is a CLI tool that allows you search for files that matches a given pattern within a directory. A simple version of find command.
This is currently distributed as a source crate, therefore you need to have rustup, cargo, and a linker installed. Refer to Rust's install guide.
If you have the above set up, run
cargo install filesearchfilesearch <pattern> [directory]-
<pattern>(required): Then search pattern to match against file names.- Can be a simple string, e.g.
main - Can be a wildcard pattern, e.g.
test-*,*.rs - Case sensitive
- Can be a simple string, e.g.
-
<directory>(required): The directory to search (recursively) in.- Defaults to
.(current working directory). - Must be a valid directory path
- Example:
.,./src
- Defaults to
# Find all Rust files in the current folder
filesearch "*.rs" .# Find a specific config file in the /etc folder
filesearch "hosts" /etcTo get more information about the tool, run:
filesearch --helpOr
filesearch -hℹ️
Note: Patterns must be an exact match unless wildcards are used. Searching for
mainwill not findmain.rs.