Use qdel to delete all my jobs at once, not one at a time

前端 未结 9 1542
悲哀的现实
悲哀的现实 2020-12-22 18:42

This is a rather simple question but I haven\'t been able to find an answer.

I have a large number of jobs running in a cluster (>20) and I\'d like to delete them al

9条回答
  •  礼貌的吻别
    2020-12-22 19:40

    # Delete all jobs owned by the current user.
    # 
    # Command breakdown:
    # ------------------
    #
    # qselect
    # -u selects all jobs that belong to the current user
    # -s EHQRTW selects all job states except for Complete
    #
    # xargs
    # --no-run-if-empty Do not run qdel if the result set is empty
    #                   to avoid triggering a usage error.
    #
    # qdel
    # -a delete jobs asynchronously
    #
    # The backslashes are a trick to avoid matching any shell aliases.
    
    \qselect -u $(whoami) -s EHQRTW | \xargs --no-run-if-empty \qdel -a
    

提交回复
热议问题