↑ ↓ select, Enter open, Esc close

Show the crontabs of all users at once

root@server
for u in $(cut -d: -f1 /etc/passwd); do crontab -l -u "$u" 2>/dev/null | grep -vE '^(#|$)' | sed "s/^/$u: /"; done

Fetches the crontab of every user in /etc/passwd, hides comments and blank lines and puts the user name in front of each line. Scheduled tasks from Plesk end up in the crontab of the respective subscription user or root and therefore appear as well. Users without a crontab are silently skipped.

Note: System-wide jobs from /etc/crontab, /etc/cron.d/ and systemd timers are not included.

Also searched as

  • show cron jobs for all users
  • crontab -l for all users
  • list all cron jobs on the server
  • scheduled tasks of all customers

Related one-liners

All in Cron

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.