Skip to content

Instantly share code, notes, and snippets.

@talesa
Last active January 9, 2020 00:15
Show Gist options
  • Save talesa/53f27919517d8142b1d3bac61b43f4c8 to your computer and use it in GitHub Desktop.
Save talesa/53f27919517d8142b1d3bac61b43f4c8 to your computer and use it in GitHub Desktop.
Various useful bash commands
# lsf bkill all pending jobs
bkill `bjobs -p -o jobid | grep -v ^JOBID | tr '\n' ' '`
# lsf bkill jobs matching pattern
bkill `bjobs -w | grep MultipleGRUs2 | awk '{print $1}' | tr '\n' ' '`
# something to do with the largest snapshots in the directory
du -sh * | sort -rh | head -n 5 | awk '{print $2"/*.pt"}' | xargs -I@ sh -c 'ls @'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment