Back to commands

Web Server Rescue

Read-only

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

next steps

Related commands

Hosting Operations Read-only

Check the Nginx Site Symlink Target

Verify which release or document root symlink Nginx is serving before changing deploy links.

readlink -f /srv/www/example.com/current
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 /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
Web Server Rescue Can be slow

Inspect Release Disk Usage

Disk pressure during deploys often starts in old release directories.

du -sh releases/* 2>/dev/null | sort -h | tail -10
Hosting Operations Read-only

Check the Active Release Symlink

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

readlink /srv/www/example/current && cat /srv/www/example/current/VERSION
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.

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

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