Giter Club home page Giter Club logo

checksum-comparator's Introduction

checksum-comparator

perform the comparison of 2 directories creating a checksum of each file and store them for future incremental checks.
If a file had changed since the last execution, the change will be detected and the checksum will be computed again.

build status

Build Status

Usage

USAGE: ./checksum-comparator.sh [options] <src_dir> <dst_dir>

options:
  -s | --silent: don't print anything
  -r | --refresh: ignore already computed local checksums
  --error: [default] print only errors found. ex: missing files, different files
  --info: print information about the computed files
  --debug: print debug information
  --trace: print all the possible information

./checksum-comparator.sh compares src and dst directories performing checksums of all the files
It can be interrupted at any time and restarted later
exit value:
  0: the 2 directories contains the same files
  not 0: the 2 directories have at least one difference or an error occurred

checksum-comparator's People

Contributors

fabiottini avatar matteomazza91 avatar

Watchers

 avatar  avatar  avatar

Forkers

fabiottini

checksum-comparator's Issues

Hide checksum files

Problem Description

The checksum-comparator creates checksum files in the src and dst directories. This can be annoying listing directories.

Proposed Solution

create hidden checksum files instead

MAC compliant

I tried this software on a mac but have some trouble on the parameters reading.

My configuration is:

  • mac os 10.14.4
  • bash 3.2.57

read-only mode

Proposal

add read-only mode for the execution. In particular, add the following options

  • read-only: do not write checksum files
  • read-only-src: do not write checksum files in the src directory
  • read-only-dst: do not write checksum files in the dst directory

this should be helpful to make the comparison if at least one of the 2 directories is mounted as read-only, or if the user does not have write permission

Incremental Comparison

Problem Description

If the checksum-comparator script is interrupted (e.g. user pressing CTRL+C), it can create an empty file for the checksum that will surely results in a mistake during next execution.

Possible Solution

checksum-comparator should check that each already existing checksum file is not empty

Refresh argument

Proposal

add a refresh option to execute the checksum-comparator as if no checksum files exist.

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.