Skip to content

Instantly share code, notes, and snippets.

@perfectfoolish
Created January 10, 2014 07:05
Show Gist options
  • Save perfectfoolish/8348032 to your computer and use it in GitHub Desktop.
Save perfectfoolish/8348032 to your computer and use it in GitHub Desktop.
50 23 * * * git /home/git/temp_clean/clean_process.sh >> /home/git/temp_clean/log/clean_process.log 2>&1
#! /bin/bash
ps -ef | grep ssh_rpc | awk '{print $2,$5}'| grep -v :| awk '{print "kill",$1}' > /home/git/temp_clean/clean_exec.sh
chmod +x /home/git/temp_clean/clean_exec.sh
/home/git/temp_clean/clean_exec.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment