Browse Source

add docker clean up function and alias for update .bashrc

master
Markus Bergholz 2 years ago
parent
commit
1a0250a60a
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      bash/mb.bashrc

+ 9
- 0
bash/mb.bashrc View File

@@ -115,3 +115,12 @@ function getIP(str,ret){
NR > 1 {{if(NR==2)print "Local - Remote";local=getIP($2);remote=getIP($3)}{print local" - "remote}}' /proc/net/tcp
}
alias ns=_netstat

function _docker_tabula_rasa(){
docker rm $(docker ps -a -q) --force
docker rmi $(docker images -q) --force
yes|docker system prune
docker volume rm $(docker volume ls -q --filter dangling=true) --force
}

alias updatebash="source ~/.bashrc"

Loading…
Cancel
Save