Skip to content

Instantly share code, notes, and snippets.

View samuel3jackson's full-sized avatar

Salim Rekaibi samuel3jackson

View GitHub Profile
@samuel3jackson
samuel3jackson / sed cheatsheet
Created May 25, 2018 05:46 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@samuel3jackson
samuel3jackson / docker-cleanup-resources.md
Created May 18, 2018 23:46 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm