Geody Labs


# Main Index: Debian Linux Magic Spells Cheat Sheet (one liners, how to, tips and tricks)

# Checksum and Hashing

Get the checksum of a file

sum PATH/FILE # return the checksum and block count for FILE sha1sum PATH/FILE # return the SHA1 (160-bit) checksum for FILE cksum PATH/FILE # return the CRC checksum and byte count for FILE

Get the hash of a file

md5sum PATH/FILE # Return the MD5 hash for the content of the given FILE md5sum PATH/FILE* # Return the MD5 hash for the content of the files matching the given mask md5sum PATH/FILE1 PATH/FILE2 PATH/FILE3 # Return the MD5 hash for the given FILEs echo -n "STRING" | md5sum | sed "s/ -//g" # Return the MD5 hash of the given STRING echo -n "STRING" | sha1sum | sed "s/ -//g" # Return the SHA1 hash of the given STRING echo -n "STRING" | sha224sum | sed "s/ -//g" # Return the SHA224 hash of the given STRING echo -n "STRING" | sha256sum | sed "s/ -//g" # Return the SHA256 hash of the given STRING echo -n "STRING" | sha384sum | sed "s/ -//g" # Return the SHA384 hash of the given STRING echo -n "STRING" | sha512sum | sed "s/ -//g" # Return the SHA512 hash of the given STRING VARIABLE=`echo -n "STRING" | md5sum | sed "s/ -//g"`; # Store the MD5 hash of the given STRING into a VARIABLE VARIABLE=`echo -n "STRING" | md5sum | sed "s/ -//g"`; echo "[$VARIABLE]"; # Store the MD5 hash of the given STRING into a VARIABLE and output it between square brackets




Please DONATE to support the development of Free and Open Source Software (PayPal, Credit Card, Bitcoin, Ether)

Page issued on 25-Sep-2022 05:45 GMT
Copyright (c) 2022 Geody - Legal notices: copyright, privacy policy, disclaimer