Giter Club home page Giter Club logo

duplicate_files_extractor's Introduction

no-more-duplicates-files


Project Goal

The goal of this project is to help us to:

  • List all duplicates files base on a parent directory

  • Delete all duplicates files base on a parent directory

what remains to be done ?

  • integration of a cli interface allowing:
    • execute commands (duplicate search, selection, deletion)
    • visualization of the directory tree (just towards duplicates)
    • selection of duplicates to delete

How its work ? :

To fully understand how this project works, we all need to first understand this

  • What is a Hash Function ?

    A hash function is a mathematical algorithm that takes an input (or 'message') and produces a fixed-size string of characters, which is typically a hash code.

  • What is a file Hashing ?

    When it comes to files, the contents of the file are the input to the hash function. The hash function then produces a fixed-length hash value (often represented as a hexadecimal number). Even a small change in the file content should result in a substantially different hash value.

  • Duplicate File Detection

    By comparing the hash values of files, you can quickly determine whether the file contents are identical. If two files have the same hash value, they are highly likely to be duplicates. This is because, for practical purposes, it's extremely rare for different files to produce the same hash.

Implementation :

  1. We browse the parent directory, and save its entire tree in a data structure (n-ary tree)

  2. Next time , for each n-ary tree node ( correspoding to sub_folders ) we browse his files and save hash in another datastructure (dictionary) like key = file_hash and value = array of files that have same hash

  3. Finally , we browse her dictionary to show / delete all duplicates files in tree

How to run source code locally ?

  • TESTS : make test

  • RUN : make run

  • CLEAN : make clean

duplicate_files_extractor's People

Contributors

lekenecedric avatar

Stargazers

 avatar

Watchers

 avatar

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.