Coder Social home page Coder Social logo

checksum's Introduction

checksum

An utility to quick compare shasum output files from directories

Dependencies

  • Python >= 3.2

Generating SHASUM files

First you need to create 2 shasum files with different directories, if you don't know how, you can do it with this bash script:

find {directory} -type f -exec shasum -a 256 {} \; > {output_file}

This command will generate a file using the algorithm SHA256 to compute recursively each file in the specified directory

How to use this tool

Syntax

python3 checksum.py --prod={file1} --resp={file2} --prefix1={prefix_from_file1} --prefix2={prefix_from_file2} --out={output_file}

Running this command will generate an output file comparing both files named results.txt, opening this file will give information about which files are diferent or missing in one file or another.

The output files describes only the differences, and use a nomenclature to define what kind of difference has been detected.

[-1-] = the file is only present in file1
[-2-] = the file is only present in file2
[=/=] = the file is present in both files, but the content is different.

Parameters

	--file1 : Specify the first SHASUM filename to compare
	--file2 : Specify the second SHASUM filename to compare
	--prefix1 : the directory prefix used to compare files structures in file1
	--prefix2 : the directory prefix used to compare files structures in file2
	--out : Specify a custom output filename (Optional)

TO-DO

  • Improve the speed of the tool.

checksum's People

Contributors

rafaga avatar

Watchers

James Cloos 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.