Skip to content

Instantly share code, notes, and snippets.

@samukasmk
Created June 30, 2015 20:09

Revisions

  1. samukasmk created this gist Jun 30, 2015.
    8 changes: 8 additions & 0 deletions generate_chef_checksum.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Command
    shasum -a 256 /path/to/file | cut -c-12

    # Example:
    > shasum -a 256 ~/Desktop/Python-3.4.0.tgz | cut -c-12 (master⚡)
    d2c83ea02177

    # learned in: https://coderwall.com/p/bbfjrw/calculate-checksum-for-chef-s-remote_file-resource