https://github.com/martinrepo/findr
https://github.com/martinrepo/findr
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/martinrepo/findr
- Owner: MartinRepo
- Created: 2025-06-01T20:35:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-02T10:20:50.000Z (about 1 year ago)
- Last Synced: 2025-06-02T20:23:54.209Z (about 1 year ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
```bash
cargo install martinrepo-findr
```
### From Source
1. Make sure you have Rust installed. If not, install it from [rustup.rs](https://rustup.rs)
2. Clone this repository:
```bash
git clone https://github.com/MartinRepo/FindR.git
cd findr
```
3. Build and install:
```bash
cargo install --path .
```
## Usage
```bash
findr
```
### Arguments
- `pattern`: The text pattern to search for
- `path`: Path to the file to search in
### Examples
Search for "hello" in a file:
```bash
findr hello file.txt
```
Search for "error" in a log file:
```bash
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
```bash
cargo build
```
### Running Tests
```bash
cargo test
```
### Running in Debug Mode
```bash
cargo run --
```
## License
This project is licensed under the MIT License - see the LICENSE file for details.