Linux Survival Basics
Read-onlyShow the Real User Cron Jobs
You need to inspect a user's scheduled cron commands without editing the crontab.
Command
crontab -l | sed -n '/^[[:space:]]*#/d;/^[[:space:]]*$/d;p'
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use it as a full system scheduler audit; cron.d, cron.daily, and systemd timers live elsewhere.
Expected output
Active, non-comment user cron lines plus environment assignments. No output means this user may not own the job.
System impact
Read-only. Nothing changes. The command prints the active, non-comment crontab lines.
Recovery / rollback: no state is changed.
When to use it
Use when a job ran unexpectedly or did not run and you need the user's cron schedule first.
When not to use it
Do not use it as a full system scheduler audit; cron.d, cron.daily, and systemd timers live elsewhere.
Cron user and environment
Cron runs with a smaller environment than your shell. Confirm the job belongs to the expected user and uses absolute paths or explicit PATH.
crontab -lsudo crontab -u app -l
next steps
Related commands
Show HTTPS Certificate with curl
curl can show the certificate path a client actually sees.
curl -Iv https://example.com/ 2>&1 | sed -n "/SSL connection/,/expire date/p"
Turn Cron Into a Readable Table
Cron is easier to debug when the schedule and command stop blending together.
crontab -l | awk 'NF && $1 !~ /^#/ {printf "%-16s %s\n", $1" "$2" "$3" "$4" "$5, substr($0,index($0,$6))}'
Count Source Files by Extension
A quick extension count can show whether expected content made it into the source tree.
find source -type f -printf '%f\n' | sed -n 's/.*\.//p' | sort | uniq -c | sort -nr
List URLs from a Sitemap
Before comparing sitemap coverage, print the URLs plainly.
grep -o '<loc>[^<]*</loc>' public/sitemap.xml | sed 's#<loc>##;s#</loc>##'
Inspect the Unit File and Drop-ins Together
The bug may be in an override file, not the main unit.
systemctl cat app-worker
next diagnostic step
Where to go from this command
- Cron job not running hub Use when a scheduled job is missing, silent, or running under the wrong user.
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.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.