Sha256 checksum mac4/15/2023 ![]() ![]() ![]() Just an example, on system 1 I have this order: drwxr-xr-x 0 root wheel 0 27 Jul 07:23 usr/ As some helpers mentioned in the comments that I should use the same version of tar in all systems. Tar would be excellent as it "archives" a folder and then I could shasum it, however the order of how tar "walk" the folder structure is not consistent across operating systems. It was consistent between MacOS and FreeBSD, but Linux returned a weird hash find CONTENTS -type f -exec shasum \ | sort -k 2 | shasum Tried to use but seems that this tar option doesn't work on MacOS. How could I calculate the hash of a directory in MacOS? On Linux and FreeBSD, the shasum have the same behavior when I do shasum however, on MacOS the shasum give me hashes for files only.ħf986e5e5289c59db1bba48df92ffe4707830aaa CONTENTS/ I'm writing a shell script that uses the shasum to check if the contents of a directory have changed. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |