ファイルの同一性
cmp コマンド
バイト単位で比較する.
cmp ファイル1 ファイル2
-s…--silentステータスだけ返す
diff コマンド
テキストファイルの差分で使う.
diff テキストファイル1 テキストファイル2
SHA-256
shasum -a 256 ファイル
SHA-1
openssl sha1 ファイル
# or
shasum -a 1 ファイル
MD5
openssl md5 ファイル
バイト単位で比較する.
cmp ファイル1 ファイル2
-s … --silent ステータスだけ返すテキストファイルの差分で使う.
diff テキストファイル1 テキストファイル2
shasum -a 256 ファイル
openssl sha1 ファイル
# or
shasum -a 1 ファイル
openssl md5 ファイル