Skip to content

Instantly share code, notes, and snippets.

@icaoberg
Last active May 6, 2024 16:37
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save icaoberg/5374558 to your computer and use it in GitHub Desktop.
Save icaoberg/5374558 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
@fabeit
Copy link

fabeit commented Oct 2, 2020

This is great, thanks!

@linminhtoo
Copy link

fantastic, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment