martinrepo-findr

Crates.iomartinrepo-findr
lib.rsmartinrepo-findr
version0.2.0
created_at2025-06-02 10:20:39.980875+00
updated_at2025-06-02 10:20:39.980875+00
descriptionA tool to search files
homepagehttps://github.com/MartinRepo/FindR
repositoryhttps://github.com/MartinRepo/FindR
max_upload_size
id1697826
size24,906
Chi Xing (MartinRepo)

documentation

README

FindR

A fast and memory-efficient command-line tool to search for patterns in files, written in Rust.

Features

  • Memory-efficient file processing using buffered reading
  • Simple and intuitive command-line interface
  • Fast pattern matching
  • Handles files of any size

Installation

From Crates.io

cargo install martinrepo-findr

From Source

  1. Make sure you have Rust installed. If not, install it from rustup.rs
  2. Clone this repository:
    git clone https://github.com/MartinRepo/FindR.git
    cd findr
    
  3. Build and install:
    cargo install --path .
    

Usage

findr <pattern> <path>

Arguments

  • pattern: The text pattern to search for
  • path: Path to the file to search in

Examples

Search for "hello" in a file:

findr hello file.txt

Search for "error" in a log file:

findr error server.log

How it Works

FindR uses buffered reading to process files line by line, making it memory efficient even for very large files. It reads the input file in chunks rather than loading the entire file into memory at once.

Development

Building

cargo build

Running Tests

cargo test

Running in Debug Mode

cargo run -- <pattern> <path>

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 4

cargo fmt