https://github.com/f1x3d/directory.deduplicate
A CLI tool to find and remove duplicate files inside a directory
https://github.com/f1x3d/directory.deduplicate
cli command-line csharp dotnet dotnet-core dotnet-tool hacktoberfest native-aot
Last synced: 2 months ago
JSON representation
A CLI tool to find and remove duplicate files inside a directory
- Host: GitHub
- URL: https://github.com/f1x3d/directory.deduplicate
- Owner: f1x3d
- License: mit
- Created: 2024-10-04T14:13:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T23:33:39.000Z (over 1 year ago)
- Last Synced: 2024-12-16T16:58:22.131Z (over 1 year ago)
- Topics: cli, command-line, csharp, dotnet, dotnet-core, dotnet-tool, hacktoberfest, native-aot
- Language: C#
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Directory.Deduplicate
[](https://nuget.org/packages/Directory.Deduplicate.Cli)
A CLI tool to find and remove duplicate files inside a directory.
# Installation
1. [Download the latest release binary](https://github.com/f1x3d/Directory.Deduplicate/releases/latest)
2. Install as a global .NET tool:
```
dotnet tool install --global Directory.Deduplicate.Cli
```
# Usage
```
Usage:
dedupe [options]
Arguments:
Directory to scan for duplicates
Options:
--sort-by (REQUIRED)
Property to sort by when determining the file copy to keep
--sort-direction (REQUIRED)
Sort direction when determining the file copy to keep. The first file in the sorted list will be kept
--force
Delete duplicate files. A dry run is performed without this option specified [default: False]
-r, --recursive
Scan sub-directories recursively [default: False]
-v, --verbose
Print file attributes on match [default: False]
--version
Show version information
-?, -h, --help
Show help and usage information
```
# Examples
* Find and delete all duplicates under the `photos` folder and its sub-folders, keeping the oldest file:
```
dedupe photos --recursive --force --sort-by ModifiedTime --sort-direction Ascending
```