Search notes:

Shell command: md5sum

md5sum computes an MD5 message digest or checks a file against the previously created message digest.
First, we create a file (file.txt) and compute its MD5 digest and redirect it into file.md5sum.
echo "one: foo"    >  file.txt
echo "two: bar"   >>  file.txt
echo "three: baz" >>  file.txt

md5sum file.txt > file.md5sum
Github repository shell-commands, path: /md5sum/create-md5-sum
Then, we use file.md5sum to check the integrity of file.txt.
md5sum -c file.md5sum
Github repository shell-commands, path: /md5sum/check-sum
We tamper with file.txt
sed -i 's/two/TWO/' file.txt
Github repository shell-commands, path: /md5sum/tamper-with-file
… and check its integrity again:
md5sum -c file.md5sum
Github repository shell-commands, path: /md5sum/check-sum

See also

Shell commands

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/sh...', 1745467918, '3.139.94.189', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/shell/commands/md5sum(60): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78