Skip to content

Instantly share code, notes, and snippets.

@gakadam
Forked from icaoberg/killthemall.sh
Created December 18, 2016 16:33
Show Gist options
  • Save gakadam/96048daf4db10d8acdcda5386b36ccea to your computer and use it in GitHub Desktop.
Save gakadam/96048daf4db10d8acdcda5386b36ccea to your computer and use it in GitHub Desktop.
[PBS] Delete all of the jobs associated to a specific user
#!/bin/bash
USERNAME=icaoberg
#to kill all the jobs
qstat -u$USERNAME | grep "$USERNAME" | cut -d"." -f1 | xargs qdel
#to kill all the running jobs
qstat -u$USERNAME | grep "R" | cut -d"." -f1 | xargs qdel
#to kill all the queued jobs
qstat -u$USERNAME | grep "Q" | cut -d"." -f1 | xargs qdel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment