Web Server Rescue
Read-onlyCheck the Current Release Symlink
A deploy uses a current symlink and you need to verify the active release.
Command
readlink -f releases/current && ls -ld releases/current
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use it if your platform does not use release directories or symlinks.
Expected output
The absolute path of the active release and the symlink metadata.
System impact
Read-only. Nothing changes. The command resolves and displays the symlink.
Recovery / rollback: no state is changed.
When to use it
Use after deploys, rollbacks, or suspicious version mismatches.
When not to use it
Do not use it if your platform does not use release directories or symlinks.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ ls -l releases
total 8
drwxr-xr-x 2 root root 4096 Jun 26 00:27 2026-06-25-1200
drwxr-xr-x 2 root root 4096 Jun 26 00:27 2026-06-25-1215
lrwxrwxrwx 1 root root 15 Jun 26 00:27 current -> 2026-06-25-1215
$ readlink -f releases/current && ls -ld releases/current
/work/releases/2026-06-25-1215
lrwxrwxrwx 1 root root 15 Jun 26 00:27 releases/current -> 2026-06-25-1215
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
ls -l releasesreadlink -f releases/current && ls -ld releases/current
next steps
Related commands
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
Check the Current Release Symlink
The deploy finished. The symlink told me what was actually live.
readlink -f /srv/www/example.com/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
Inspect Release Disk Usage
Disk pressure during deploys often starts in old release directories.
du -sh releases/* 2>/dev/null | sort -h | tail -10
Check Filesystem Space with df
A full disk can break logins, uploads, databases, and deploys.
df -h
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.