Thursday, 27 November 2014

Listing running crontab tasks and killing them

  • ps -o pid,sess,cmd afx | grep -A20 "cron$"

3693  3693 /usr/sbin/cron
27050  3693  \_ /USR/SBIN/CRON
27055 27055      \_ /bin/sh -c /var/somescript
27058 27055          \_ /bin/sh -c /var/somescript
3706  3706 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
3730  3706  \_ dovecot-auth
3737  3706  \_ dovecot-auth -w
902  3706  \_ imap-login
1339  3706  \_ imap-login
2398  3706  \_ pop3-login
2649  3706  \_ pop3-login
2837  3706  \_ pop3-login
2838  3706  \_ imap-login
3807  3807 pure-ftpd 


Find the process you want above 
  
  • pkill -s 27055

That's it.

No comments:

Post a Comment