Code Monkey home page Code Monkey logo

md5sum's Introduction

md5sum for OSX

example.png

Installation

sudo curl https://raw.githubusercontent.com/eexit/md5sum/master/md5sum -o /sbin/md5sum
sudo chmod a+x /sbin/md5sum

Usage

Synopsis

md5sum [-q] source_file
md5sum [-v] [-h]

Reads MD5 (128-bits) checksums in the file and compare them to the files

-q
	Quiet mode. Don't print OK messages or warnings messages

-h
	Displays this help and exits

-v
	Outputs the version information and exits

How to generate a valid MD5SUMS file

The default OSX md5 -r command doesn't generate a valid format:

$ md5 -r LICENSE
95baec3fa8136f631e8b7bad5460d7b6 LICENSE
# It should output:
95baec3fa8136f631e8b7bad5460d7b6  LICENSE

In order to fix this, you can extends the md5 this way:

$ md5 -r LICENSE | sed 's/ /  /'
95baec3fa8136f631e8b7bad5460d7b6  LICENSE

If you need to generate a valid MD5SUMS format for many files in one command:

$ find . -not -empty -type f -d 1 | \
xargs -I %s basename %s | xargs -I %s md5 -r %s | sed 's/ /  /'
95baec3fa8136f631e8b7bad5460d7b6  LICENSE
ccbd9f1144351424c0afbc9a9b5df021  md5sum
f9e4c933069ab3c67006dbbd8e9a8840  README.md

Author

Written by Joris Berthelot [email protected]
https://github.com/eexit/md5sum

md5sum's People

Contributors

eexit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

mellowiz

md5sum's Issues

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.