Reputation: 249
I have submitted a lot of jobs to qsub
and I want to cancel all those not currently running. Is there a way to do this without knowing all the jobIDs?
The answer in this question prompted me to try
qselect -u username -s qw | xargs qdel
but this did not work, and I do not want to accidentally delete my currently running jobs.
Upvotes: 0
Views: 1399
Reputation: 11
The below combination worked for me, the output is dependant on the state of the job.
qstat -u | grep "state of the job" | awk 'print{ $1 }' | tr '\n' ' ' | xargs qdel
Upvotes: 1