Hosting Operations
Read-only, can be slowFind System Cron Files Fast
System cron jobs can live in /etc/cron.d and periodic directories, so checking only crontab -l misses them.
Command
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
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 assume every listed file is executable or valid under run-parts naming rules.
Expected output
Sorted paths under /etc/cron.d and periodic cron directories.
System impact
Read-only, can be slow. Nothing changes. The command lists system cron files in stable order.
May require elevated permissions on protected paths or service-owned files.
Scope this to the smallest useful path or service on busy systems.
Recovery / rollback: no state is changed.
When to use it
Use when a scheduled task runs as root, a service user, or a package job rather than the current user.
When not to use it
Do not assume every listed file is executable or valid under run-parts naming rules.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ find /etc/cron.d /etc/cron.daily -maxdepth 1 -type f -print | sort
/etc/cron.d/app-heartbeat
/etc/cron.d/db-backup
/etc/cron.d/e2scrub_all
/etc/cron.daily/apt-compat
/etc/cron.daily/db.backup
/etc/cron.daily/dpkg
/etc/cron.daily/logrotate
$ 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
/etc/cron.d/app-heartbeat
/etc/cron.d/db-backup
/etc/cron.d/e2scrub_all
/etc/cron.daily/apt-compat
/etc/cron.daily/db.backup
/etc/cron.daily/dpkg
/etc/cron.daily/logrotate
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
find /etc/cron.d /etc/cron.daily -maxdepth 1 -type f -print | sortfind /etc/cron.d /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly -maxdepth 1 -type f -print 2>/dev/null | sort
next steps
Related commands
Check Whether Expected Build Outputs Exist
The deploy failed because the build never produced the file.
find artifacts/dist -maxdepth 2 -type f | sort
Compare Source and Backup File Lists
A backup can be missing files and still look plausible at a glance.
comm -3 <(find source -type f | sed 's#^source/##' | sort) <(find backup -type f | sed 's#^backup/##' | sort)
List Restore Points Before a Drill
A restore drill starts by proving which backups actually exist.
cd restore-dr && find backups -maxdepth 2 -type f -name MANIFEST.txt -printf '%TY-%Tm-%Td %TH:%TM %h\n' | sort -r
Find Files Newer Than a Backup Snapshot
Files newer than the last snapshot are the ones most likely missing from it.
find source -type f -newer backup/.snapshot -print | sort
List Empty Directories as Cleanup Candidates
Empty directories are low-risk candidates, but they still deserve a preview.
find /lab/disk-inode-cleanup/var/cache/app -xdev -depth -type d -empty -print
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.
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.