Linux view all users crontab


In general we will use crontab – e or crontab -l to view crontab.

Both commands crontab -e and crontab -l will show only current users(where we logged in) crontab.

To view other user crontabs use following command:

$ crontab -u <userName> -l

To list guest user crontab use following command:

$ crontab -u guest -l

Before running above command you need to login into root.

In Ubuntu based operating systems we need to use sudo with above command.

$ sudo crontab -u guest -l

To view all users crontab user following command:

$ for i in $(grep -P ":[0-9]{4}:[0-9]{4}" /etc/passwd | cut -d: -f1)
    crontab -u $i -l; 

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s