Skip to content

Instantly share code, notes, and snippets.

@icaoberg
Last active May 6, 2024 16:37
Show Gist options
  • 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