You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
Auxiliary commands
Compute hash values for files (hash)
Copy page
Download PDF
Compute hash values for files (hash)
You can use the hash command to compute the CRC-64 or MD5 hashes of local files or folders.​
Command syntax​
​
​
Linux/macOS
Windows
​
  • Compute the hash value of a single local file​
​
./tosutil hash file_url [-type=xxx] [-conf=xxx]​
​
  • Compute the hash values of files in a local folder​
​
./tosutil hash folder_url -r [-type=xxx] [-conf=xxx]​
​
  • Compute the hash values of files in a local folder and save the results to a local file​
​
./tosutil hash folder_url file_url|folder_url -r [-type=xxx] [-conf=xxx]​
​
​
​
Description​
​
Parameter​
Type​
Description​
-r​
Bool​
Compute the hash values of all files in a local folder.​
-type​
String​
The algorithm used to compute the hash value. Possible values:​
  • crc64 (Default)​
  • md5​
tip​
If the algorithm is md5, the result will include both hex-encoded and Base64-encoded MD5 hashes.​
​
Example​
Compute the MD5 hash of the local file, /root/test.​
  • Command​
​
./tosutil hash ./test -type md5​
​
  • Output​
​
file-path: /root/test​
hex-md5: bb7c682dddea36e5ece23fb196ff****​
base64-md5: u3xoLd3qNuXs4j+xlv/4****​
​
​
Last updated: 2025.12.17 18:33:43