Back to commands

Hosting Operations

Read-only, can be slow

Compare 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.

Watch this command run

Command transcript

This sanitized transcript shows the commands and output shape without exposing host details.

demo@lab:~$

$ ls -lh artifacts/app.tar.gz releases/current/app.tar.gz

-rw-r--r-- 1 root root 13 Jun 26 00:27 artifacts/app.tar.gz
-rw-r--r-- 1 root root 13 Jun 26 00:27 releases/current/app.tar.gz

$ sha256sum artifacts/app.tar.gz releases/current/app.tar.gz

020de28e3ded8ea3aa27c978e387b7604413181b1ce846f057bcbd8b36054244  artifacts/app.tar.gz
020de28e3ded8ea3aa27c978e387b7604413181b1ce846f057bcbd8b36054244  releases/current/app.tar.gz
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. ls -lh artifacts/app.tar.gz releases/current/app.tar.gz
  2. sha256sum artifacts/app.tar.gz releases/current/app.tar.gz

next steps

Related commands

Hosting Operations Read-only

Check the Active Release Symlink

Git may say one thing while the release pointer serves another.

cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
Hosting Operations Can be slow

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
Hosting Operations Deletes data

Verify Restored File Checksums

A restore is not validated until the bytes match.

cd restore-dr && rm -rf restore-sandbox/full && mkdir -p restore-sandbox/full && tar -xf backups/2026-06-25/site.tar -C restore-sandbox/full && (cd restore-sandbox/full && sha256sum -c CHECKSUMS.sha256)
Hosting Operations Can be slow

Exclude the Current Release from Cleanup

Release cleanup should prove what current points to before listing old directories.

current=$(readlink -f /lab/disk-inode-cleanup/home/deploy/current); find /lab/disk-inode-cleanup/home/deploy/releases -mindepth 1 -maxdepth 1 -type d ! -samefile "$current" -printf '%TY-%Tm-%Td %p\n' | 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.

  • lpic1:103-gnu-unix-commands
  • lpic1:104-filesystems-permissions-fhs
  • lfcs:essential-commands
  • lfcs:operations-deployment
  • lfcs:services-logs
  • lfcs:storage
  • linuxplus:automation-scripting
  • linuxplus:provisional
  • risk:read-only

Useful for

  • LPIC-1 style command-line practice
  • LFCS style performance tasks
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.