# get list of job's process IDs JOB_LIST=$(hadoop job -list 2> /dev/null | grep job_ | awk '{print $1}') # kill all jobs for JOB in $JOB_LIST do hadoop job -kill $JOB echo job (${JOB}) is killed now. done