Last active
December 15, 2015 05:29
-
-
Save ejhayes/5209406 to your computer and use it in GitHub Desktop.
For each user listed grab a list of their cronjobs and display back to the screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat /etc/passwd | sed -e "s/\([^:]\+\).*/\1/" | xargs -I user bash -c "echo user && su user -c \"crontab -l\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment