Last active
March 8, 2020 03:38
-
-
Save xinbinhuang/8f87632d43155b95bf885ee7c1bcee10 to your computer and use it in GitHub Desktop.
Some simple Linux/Docker/DevOps Commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################################################### | |
######## Linux Admin | |
###################################################### | |
# Disk Space Usage | |
df -h | |
# Disk Usage | |
# https://stackoverflow.com/questions/1019116/using-ls-to-list-directories-and-their-total-sizes | |
du --summarize --human-readable * # or du -sh * | |
###################################################### | |
######## Docker | |
###################################################### | |
# Docker disk usage | |
docker system df --verbose | |
# Clean up disk space used by docker | |
docker rm $(docker ps -q -f status=exited) # Clean exited processes | |
docker volume rm $(docker volume ls -qf dangling=true) # Clean dangling volumes | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) # Clean dangling images | |
docker system prune -a -f --volumes # System prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment