Skip to content

Instantly share code, notes, and snippets.

@xhan
Created September 30, 2013 04:21
Show Gist options
  • Save xhan/6759341 to your computer and use it in GitHub Desktop.
Save xhan/6759341 to your computer and use it in GitHub Desktop.
get all user's crontab list
for user in $(cut -f1 -d: /etc/passwd);
do
crontab -u $user -l 2>/dev/null
if [ $? -eq 0 ]; then
echo $user
echo "-------------------------------"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment