Title here
Summary here
while :; do sleep 5; echo "Hello"; donefor i in {1..10}; do sleep 5; doneAnother way, this time pushing the output to a file and then sorting/inspecting the output.
bpftrace is kind of awesome. It lets you basically run event-driven logic at various “attachment points” in Linux, either in kernel or user space (depending on what your kernel was built with support for).
git checkout a change, hard resets, or bad rebasesgit pull --rebase - I often check out others’ branches so I can reproduce something they’re looking at locally. Of course, they’re making changes all the time so I’ll need to pull those changes down, and I don’t want any changes I’ve made to result in merge commits etc - so this is preferred in this case.Filter an array of strings
cat pp.json | jq '.p_cfg[] | . as $network | .networks[] | select(contains("192.168.100")) | $network.upstreams'Get key value out of consul kv export file
View files open by PID (using pgrep in subcommand for convenience):
lsof -p $(pgrep -f "python3 sock_stream_server.py")View sockets by port or address
Not typically installed by default - find binaries here
Generally ss is viewed as the better, more modern successor to netstat - prefer using ss for inspecting local sockets