GithubHelp home page GithubHelp logo

blakediff's Introduction

blakediff

โš  This repository is only for testing purpose. It shouldn't be used on production.

A simple first version to make hash on all files in a directory and generate a report file with this format :

<hash_1> <path_file_1>
<hash_2> <path_file_2>

how to build and install ? i want to use it quickly !

ok let's go

cargo install --path .

yeah ok, pretty simple... but how will I update the binary with new features in the future ? ๐Ÿค”

git pull
cargo install --path .

PS : this is the same command above โฌ†๏ธ๐Ÿ˜Ž

Command generate

Use this first subcommand to generate an output with all hashes and path's files and redirect this output into a report file.

blakediff generate <path_directory>  > report_file_1

the option --parallel or -p can be used to walk directories tree in multithreading (should be used only on ssd).

Exemples :

blakediff generate ~/Music > ~/hashmusics_local.txt
blakediff generate /mnt/smbmount/Music > ~/hashmusics_smb.txt

Command compare

Generate all missing hash from the path1 in path2 and missing file from the path2 in path1

blakediff compare <report_file_1> <report_file_2>

Exemples :

blakediff compare ~/musiques_hash_local.txt ~/musiques_hash_smb.txt

Results exemples:

only in ~/musiques_hash_smb.txt : /mnt/smbmount/Music/my_song012.mp3
only in ~/musiques_hash_smb.txt : /mnt/smbmount/Music/my_song234.mp3
only in ~/musiques_hash_local.txt : /home/jeremie/Music/my_song456.mp3
duplicates : /home/jeremie/Music/shame.mp3 /mnt/smbmount/shame.mp3

Perf comparison with sha256sum

In order to avoid device bottleneck, put the directory to hash in a tmpfs, exemple with this 10G ramdisk :

sudo mount -t tmpfs -o size=10G tmpfs /media/virtuelram
  • copy your files in this /media/virtuelram directory

  • test with sha256sum

IFS=$'\n'; set -f;for f in $(find /media/virtuelram -type f); do sha256sum "$f"; done;unset IFS; set +f
  • test with blakediff
blakediff generate /media/virtuelram

unmount your ramdisk after use :

sudo umount /media/virtuelram

blakediff's People

Contributors

jeremie-h 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.