Announcement

Collapse
No announcement yet.

As root, List the crontabs for all users

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • As root, List the crontabs for all users

    Linux View Users Cronjob

    Use the following syntax to view geek users cronjob:

    Code:
    sudo crontab -u userName -l
    sudo crontab -u geek -l

    How to Display all jobs in cron / crontab

    I run the following as root user:
    Code:
    crontab -l


    List Cronjob for a particular user:

    Well depends on the script but easily you can find your crontab as root with

    Code:
    crontab -l -u <user>


    Or you can find crontab from spool where is located file for all users

    Code:
    cat /var/spool/cron/crontabs/<user>


    To show all users' crontabs with the username printed at the beginning of each line:

    Code:
    cd /var/spool/cron/crontabs/ && grep . *
Working...
X