Hosting Operations
Risk: safeCheck the Active Release Symlink
A deployment uses release directories and a current symlink, and you need to confirm which release is active.
Command
cd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
Before you run this
Risk: safe. Do not assume Git HEAD and the active release symlink always match.
Expected output
The current symlink target and VERSION file for release 2026-06-25-1030.
System impact
Nothing changes. The symlink target and release metadata are printed.
Recovery / rollback: no state is changed.
When to use it
Use during deploy or rollback triage when production is selected by a filesystem pointer.
When not to use it
Do not assume Git HEAD and the active release symlink always match.
Watch this command run
Example output from a temporary Linux lab
This example uses disposable sample files and sanitized output so you can inspect the shape of the result before touching a real system.
$ cd /work/git-recovery-rollback && ls -l releases/current
lrwxrwxrwx 1 root root 15 Jun 26 00:27 releases/current -> 2026-06-25-1030
$ cd /work/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
2026-06-25-1030
release=2026-06-25-1030
status=suspect
View reproducible demo details
This page shows the sanitized shell transcript and the setup steps needed to reproduce the example.
Lab setup steps
cd /lab/git-recovery-rollback && ls -l releases/currentcd /lab/git-recovery-rollback && readlink releases/current && cat releases/current/VERSION
next steps
Related commands
Rollback a Release Symlink in a Sandbox
Practice the pointer switch where the blast radius is zero.
cd /lab/git-recovery-rollback && ln -sfn 2026-06-25-1000 releases/current
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
Map Recent Release Commits
A rollback is easier when the last few release tags are visible.
cd /lab/git-recovery-rollback && git log --oneline --decorate --graph --all -8
Restore One File From Last Good Release
Recover a config file without rolling back the whole branch.
cd /lab/git-recovery-rollback && git restore --source=release-2026-06-25-1000 -- app/config.yml
Revert the Suspect Release Commit
Undo a bad release with a new commit instead of rewriting history.
cd /lab/git-recovery-rollback && git restore -- app/config.yml && git revert --no-edit release-2026-06-25-1030
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.
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.