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.

Explanation-only example

Illustrated output, not a live lab run

This example is intentionally illustrative. It shows the command shape without killing real processes or changing your machine.

demo@lab:~$

$ find /etc/cron.daily -maxdepth 1 -type f -printf '%f\n' | sort

apt-compat
db.backup
dpkg
logrotate

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

/etc/cron.daily/apt-compat
/etc/cron.daily/dpkg
/etc/cron.daily/logrotate
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. find /etc/cron.daily -maxdepth 1 -type f -printf '%f\n' | sort
  2. run-parts --test /etc/cron.daily

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

Scan Every CI Log for Error Lines

One grep pass can turn a log pile into a failure list.

grep -RInE 'error|failed|failure|exception|traceback' artifacts logs | head -50
Hosting Operations Can be slow

Summarize Test Counts from Reports

Before debugging a test failure, measure the blast radius.

grep -RhoE 'tests="[0-9]+"|failures="[0-9]+"|errors="[0-9]+"|skipped="[0-9]+"' artifacts/test/*.xml | sort | uniq -c
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:operations-deployment
  • lfcs:services-logs
  • 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.