Back to commands

Web Server Rescue

Read-only, can be slow

Inspect Release Disk Usage

A host is low on disk and release directories may be taking too much space.

Command

du -sh releases/* 2>/dev/null | sort -h | tail -10

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 recursive disk scans on extremely busy hosts if the extra I/O is unacceptable.

Expected output

The largest release directories, sorted by human-readable size.

System impact

Read-only, can be slow. Nothing changes. Disk usage is 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 deploys fail due to disk space or cleanup policies need review.

When not to use it

Do not run recursive disk scans on extremely busy hosts if the extra I/O is unacceptable.

Watch this command run

Command transcript

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

demo@lab:~$

$ find releases -maxdepth 2 -type f -print

releases/2026-06-25-1215/app.tar.gz
releases/2026-06-25-1215/app.txt
releases/2026-06-25-1200/app.txt

$ du -sh releases/* 2>/dev/null | sort -h | tail -10

0	releases/current
8.0K	releases/2026-06-25-1200
12K	releases/2026-06-25-1215
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. find releases -maxdepth 2 -type f -print
  2. du -sh releases/* 2>/dev/null | sort -h | tail -10

next steps

Related commands

Web Server Rescue Can be slow

Find Large Directories with du

Once you know a filesystem is full, the next question is where.

du -xh --max-depth=1 /var 2>/dev/null | sort -h
Web Server Rescue Sensitive output

Show TLS Certificate Dates

The outage was not the web server. The edge certificate had expired.

openssl s_client -connect edge.test:443 -servername edge.test </dev/null 2>/dev/null | openssl x509 -noout -dates
Web Server Rescue Sensitive output

Show TLS Certificate Names

The cert was valid, but not for this hostname.

openssl s_client -connect edge.test:443 -servername edge.test </dev/null 2>/dev/null | openssl x509 -noout -subject -ext subjectAltName
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:networking
  • lfcs:services-logs
  • lfcs:storage
  • linuxplus:automation-scripting
  • linuxplus:provisional
  • linuxplus:system-management
  • 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.