Giter Site home page Giter Site logo

hawkynt / dupmerge Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 124 KB

Merges duplicate files into hardlinks and symlinks.

License: GNU General Public License v2.0

C# 100.00%
backup deduplication duplicate files filesystem hardlink link merge snapshot symbolic

dupmerge's Introduction

DupMerge

DupMerge is a powerful tool designed to manage duplicate files efficiently by creating or removing links to them. It offers a variety of options to customize the handling of duplicate files, including creating symbolic or hard links, setting file size limits for processing, and managing read-only attributes for linked files.

Features

  • Efficient File Handling: Quickly identifies duplicate files and creates links to them, reducing disk space usage.
  • Customizable Operations: Offers options for creating symbolic links, deleting links, and removing links with file copies.
  • Flexible File Size Limits: Allows specifying minimum and maximum file sizes for processing.
  • Multithreading Support: Utilizes multiple threads for faster file processing, automatically adjusting to the number of CPU cores.
  • Read-Only Attribute Management: Provides options to set or update the read-only attribute for linked files.
  • Versatile Linking Options: Enables the creation of both hard links and symbolic links, providing flexibility in file management.

Build from Source

DupMerge is developed in C# and can be compiled using the .NET SDK. To install and build DupMerge, you will need to have the .NET SDK installed on your machine. Follow these steps:

rem Clone the repository
git clone https://github.com/Hawkynt/DupMerge.git
rem Clone the C--FrameworkExtensions repository into a parallel directory named Framework, because we gonna need some files from it to build a monolithic executable
git clone https://github.com/Hawkynt/C--FrameworkExtensions.git Framework
rem Navigate to the project directory
cd DupMerge
rem Build the project using .NET CLI
dotnet build

This will compile the application and produce an executable within the bin/ directory.

Usage

DupMerge [<options>] [<directories>]

Options

  • -v, --info: Show information only, without making any changes.
  • -t <n>, --threads <n>: Specify the number of threads to use for crawling. Defaults to the number of CPU cores or 8, whichever is less.
  • -m <n>, --minimum <n>: Specify the minimum file size to process. Defaults to 1.
  • -M <n>, --maximum <n>: Specify the maximum file size to process.
  • -s, --allow-symlink: Allow creating symbolic links if a hardlink cannot be created.
  • -Dhl, --delete-hardlinks: Delete all hard links.
  • -Dsl, --delete-symlinks, --delete-symboliclinks: Delete all symbolic links.
  • -D, --delete: Same as -Dhl -Dsl.
  • -Rhl, --remove-hardlinks: Remove hard links and replace them with a copy of the linked file.
  • -Rsl, --remove-symlinks, --remove-symboliclinks: Remove symbolic links and replace them with a copy of the linked file.
  • -R, --remove: Same as -Rhl -Rsl.
  • -sro, --set-readonly: Set the read-only attribute on newly created sym/hard-links.
  • -uro, --update-readonly: Set the read-only attribute to existing sym/hard-links.
  • -ro, --readonly: Same as -sro -uro.

Examples

rem Scan the current directory for duplicates, show info only
DupMerge --info .

rem Create hardlinks for duplicates in multiple directories, using 4 threads
DupMerge.exe -t 4 C:\path\to\dir1 C:\path\to\dir2

rem Delete all symbolic links in the specified directory
DupMerge.exe --delete-symlinks C:\path\to\dir

Contributing

We welcome contributions to DupMerge! If you have a bug report, feature request, or a patch, please feel free to submit an issue or pull request on GitHub. For more detailed information, please see our CONTRIBUTING file.

License

This project is licensed under the GPL v2 License - see the license file for details.

dupmerge's People

Contributors

hawkynt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jayd2446

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.