Save checksums of all files in a directory
create checksums for backup | sha256sum all files recursively | generate checksum list linux | file integrity baseline | sha256sum | checksum | backupCaution: This command changes the system. Understand what it does before you run it.
cd /var/www/vhosts/example.com/httpdocs && find . -type f -exec sha256sum {} + > /tmp/example.com.sha256Changes into the directory and writes one line per file with its SHA-256 checksum and relative path to the list. Thanks to the relative paths, the same list can later be checked against a copy in another location or on another server. Also useful as a reference against unnoticed tampering with a website.
Note: Do not store the list inside the directory being checked. An existing file with the same name is overwritten.
Also searched as
- create checksums for backup
- sha256sum all files recursively
- generate checksum list linux
- file integrity baseline