Hosting Operations
Read-only, can be slowCompare Artifact Checksums
You need to confirm whether a built artifact and deployed artifact are identical.
Command
sha256sum artifacts/app.tar.gz releases/current/app.tar.gz
Before you run this
System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.
When not to use it: Do not run it on huge files if hashing would compete with production I/O during an incident.
Expected output
Two SHA-256 hashes and filenames; matching hashes mean matching file contents.
System impact
Read-only, can be slow. Nothing changes. Checksums are calculated and printed.
Scope this to the smallest useful path or service on busy systems.
Recovery / rollback: no state is changed.
When to use it
Use when checking whether a deployed artifact matches the built artifact.
When not to use it
Do not run it on huge files if hashing would compete with production I/O during an incident.
next steps
Related commands
Create a SHA256 Checksum Manifest
A file list says what exists; checksums say whether bytes match.
sha256sum source/app/config.yml source/content/index.md source/content/about.md source/assets/logo.svg
Verify Restored File Checksums
A restore is not validated until the bytes match.
BACKUP_ROOT=/srv/backups/site RESTORE_SANDBOX=/tmp/linuxoneliners-restore/full && rm -rf "$RESTORE_SANDBOX" && mkdir -p "$RESTORE_SANDBOX" && tar -xf "$BACKUP_ROOT/2026-06-25/site.tar" -C "$RESTORE_SANDBOX" && (cd "$RESTORE_SANDBOX" && sha256sum -c CHECKSUMS.sha256)
Find Release Files Writable Outside the Owner
A release file that someone besides the owner can modify deserves a second look.
find /srv/www/example/releases/current -type f -perm /0022 -printf '%M %u:%g %p\n' 2>/dev/null | sort
Verify a SHA256 Checksum Manifest
A checksum file is only useful if you actually verify it.
sha256sum -c checksums.sha256
Exclude the Current Release from Cleanup
Release cleanup should prove what current points to before listing old directories.
current=$(readlink -f /home/deploy/current); find /home/deploy/releases -mindepth 1 -maxdepth 1 -type d ! -samefile "$current" -printf '%TY-%Tm-%Td %p\n' 2>/dev/null | sort
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.