Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



hash - Calculate file hashes

hash - Calculate file hashes

Synopsis

gsutil [-c] [-h] [-m] hash filename...

Description

The hash command calculates hashes on a local file that can be used to compare with gsutil ls -L output. If a specific hash option is not provided, this command calculates all gsutil-supported hashes for the file.

Note that gsutil automatically performs hash validation when uploading or downloading files, so this command is only needed if you want to write a script that separately checks the hash for some reason.

If you calculate a CRC32c hash for the file without a precompiled crcmod installation, hashing will be very slow. See gsutil help crcmod for details.

Options

-c Calculate a CRC32c hash for the file.
-h Output hashes in hex format. By default, gsutil uses base64.
-m Calculate a MD5 hash for the file.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.