Back to commands

Hosting Operations

Read-only

Catch Cron Daily Files That Will Be Skipped

run-parts only executes files matching its naming rules, so backup scripts with dots can be ignored.

Command

run-parts --test /etc/cron.daily

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not use it to run the jobs; --test is only a dry inspection.

Expected output

A list of periodic cron scripts that pass run-parts selection rules.

System impact

Read-only. Nothing changes. run-parts prints which files it would run.

May require elevated permissions on protected paths or service-owned files.

Recovery / rollback: no state is changed.

When to use it

Use when a script in cron.daily, cron.hourly, cron.weekly, or cron.monthly does not appear to execute.

When not to use it

Do not use it to run the jobs; --test is only a dry inspection.

next steps

Related commands

Hosting Operations Can be slow

Find System Cron Files Fast

A job can be nowhere in your crontab and still run every night.

find /etc/cron.d /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly -maxdepth 1 -type f -print 2>/dev/null | sort
Hosting Operations Can be slow

List Failed Tests from JUnit XML

The XML report already knows which tests failed.

grep -RIn '<failure\|<error' artifacts/test/*.xml
Hosting Operations Can be slow

Find Logs Missing Logrotate Coverage

The biggest log risk is often the file no policy mentions.

find /var/log -type f -name '*.log' -printf '%p\n' | while read -r log; do grep -Rqs -- "$log" /etc/logrotate.conf /etc/logrotate.d || grep -Rqs -- "$(dirname "$log")/[*].log" /etc/logrotate.conf /etc/logrotate.d || printf '%s\n' "$log"; done
Hosting Operations Can be slow

Find Apache Document Roots

Apache was serving files from a different directory than expected.

grep -RInE '^[[:space:]]*DocumentRoot[[:space:]]' /etc/apache2/sites-enabled 2>/dev/null
Hosting Operations Can be slow

Map Apache Proxy Rules

Apache was up. The reverse proxy target was wrong.

grep -RInE '^[[:space:]]*(ProxyPass|ProxyPassReverse)[[:space:]]' /etc/apache2/sites-enabled 2>/dev/null
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.

  • LFCS style performance-task practice

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