# fclones

> Command-line duplicate file finder and remover with parallel processing and multiple deduplication strategies.

Stars: 3.0k · Categories: File Management

- Repository: https://github.com/pkolaczk/fclones
- Page: https://www.trmn.sh/tools/fclones

## Install

- Homebrew: `brew install fclones`
- Snap: `snap install fclones`
- Cargo: `cargo install fclones`

## Overview

fclones is a command-line utility for identifying and removing duplicate files across directory trees. It operates in two phases: the `group` command finds identical files and outputs them in various formats (text, JSON, CSV), while separate commands like `remove`, `link`, and `dedupe` handle cleanup operations. The tool supports multiple deduplication strategies including file removal, hard/soft linking, and copy-on-write reflinks on supported filesystems.

The tool includes extensive filtering capabilities for file selection, supporting glob patterns, regular expressions, size constraints, and recursion depth limits. It can work with piped input from other utilities or process files directly from stdin. Priority options allow users to specify which files to preserve based on modification time, creation time, or directory nesting level.

Built in Rust with performance optimization as a core focus, fclones employs parallel processing for I/O operations, adapts access patterns based on storage type (SSD vs HDD), and uses path compression to handle millions of files efficiently. It includes features like progress reporting, dry-run mode for preview operations, and hash caching for improved performance on subsequent runs. The tool integrates well with Unix utilities and provides machine-readable output formats for automation workflows.

### Installation

```bash
# via Homebrew
brew install fclones
```

```bash
# via Snap
snap install fclones
```

```bash
# via Cargo
cargo install fclones
```

## Alternatives

- [diskonaut](https://www.trmn.sh/tools/diskonaut.md): Interactive disk usage analyzer with treemap visualization for exploring and cleaning up disk space (3.1k stars)
- [viu](https://www.trmn.sh/tools/viu.md): Rust command-line image viewer for the terminal using the iTerm or Kitty graphics protocols, with a half-block fallback and animated GIF support. (Rust, 3.3k stars)
- [erdtree](https://www.trmn.sh/tools/erdtree.md): Multi-threaded filesystem and disk usage utility with gitignore awareness, multiple layouts, and file search capabilities (2.6k stars)
- [doxx](https://www.trmn.sh/tools/doxx.md): Terminal-native .docx document viewer with formatting, search, and export capabilities (3.8k stars)
- [ouch](https://www.trmn.sh/tools/ouch.md): CLI tool for compressing and decompressing files across 14+ formats with automatic format detection (Rust, 3.8k stars)

---

Canonical: https://www.trmn.sh/tools/fclones
