Skip to content

Instantly share code, notes, and snippets.



Last active Oct 16, 2019
What would you like to do?
Collection of bash tricks
# Average file size in folder
# Credits:
ls -l | awk '{s+=$5} END {print "Average file size: " s/NR/1024 "k"}'
# Clear Docker related data
docker kill $(docker ps -q) # Kill running containers
docker rm $(docker ps -a -q) # Remove existing containers
docker rmi $(docker images -q) # Remove images
docker rmi $(docker images -q -f dangling=true) # Remove untagged images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.