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
System cron file paths under /etc/cron.d and periodic cron directories. Empty output means this host may not use those locations or permissions hide them.
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.
Common misread
System cron files are not the same as a user crontab. Check both before adding duplicate schedules.
crontab -lfind /etc/cron.d /etc/cron.hourly /etc/cron.daily -maxdepth 1 -type f -print
next steps
Related commands
Show Enabled Apache Sites
The Apache config existed. The enabled symlink did not.
find /etc/apache2/sites-enabled -maxdepth 1 -type l -printf '%f -> %l\n' 2>/dev/null | sort
List Empty Directories as Cleanup Candidates
Empty directories are low-risk candidates, but they still deserve a preview.
find /var/cache -xdev -depth -type d -empty -print 2>/dev/null
Group Writable Files by Owning Group
Group-writable files are not automatically wrong, but the owning group decides the risk.
find /srv/www/example -type f -perm -0020 -printf '%g %M %p\n' 2>/dev/null | sort
Exclude the Current Release from Cleanup
Release cleanup should prove what current points to before listing old directories.
current=$(readlink -f /home/deploy/current); find /home/deploy/releases -mindepth 1 -maxdepth 1 -type d ! -samefile "$current" -printf '%TY-%Tm-%Td %p\n' 2>/dev/null | sort
Find Release Files Writable Outside the Owner
A release file that someone besides the owner can modify deserves a second look.
find /srv/www/example/releases/current -type f -perm /0022 -printf '%M %u:%g %p\n' 2>/dev/null | sort
next diagnostic step
Where to go from this command
- Cron job not running hub Use when the job may live outside the current user crontab.
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.