Handy little snippet to show Docker container ID’s

for container in $(docker ps –all –quiet –format ‘{{ .Names }}’); do echo “$(docker inspect $container –format ‘{{.GraphDriver.Data.MergedDir }}’ | sed ‘s#/\([^az]*\)\.*$##’ ) = $container”done   Original link – https://forums.docker.com/t/any-way-to-tell-where-a-file-in-overlay2-is-used/94965

Read More »

tcpdump on each interface individually

Original article here: https://serverfault.com/questions/224698/how-to-display-interface-in-tcpdump-output-flow #!/bin/bash#===================================================================================## FILE: dump.sh# USAGE: dump.sh [-i interface] [tcpdump-parameters]# DESCRIPTION: tcpdump on any interface and add the prefix [Interace:xy] in front of the dump data.# OPTIONS: same as tcpdump# REQUIREMENTS: tcpdump, sed, ifconfig, kill, awk, grep, posix regex matching# BUGS: —# FIXED: – In 1.0 The parameter -w would not work without […]

Read More »