List cron jobs system-wide
Print active cron lines for every user
for u in $(cut -f1 -d: /etc/passwd); do crontab -l -u $u 2>/dev/null | grep -v '^#' | sed "s|^|$u: |"; done
More linux commands
-
systemd-analyze calendar '*/5 * * * *'Parse and show next 5 trigger times for a cron expression
-
command > /tmp/out.log 2> /tmp/err.logSplit stdout and stderr into separate files
-
command 2>&1 | tee /tmp/all.logRedirect stdout+stderr to file and screen simultaneously
-
grep -rl 'old_string' /etc/ | xargs sed -i 's/old_string/new_string/g'Find files containing text, then replace in-place
-
awk '{print $1, $3}' /etc/passwdPrint 1st and 3rd fields of a space-delimited file