DEV Community

gie3d
gie3d

Posted on

Unix commands cheat sheet

Kill all jMeter (or any processes) executions

ps -ef | grep jmeter | awk '{print $2}' | xargs kill -9
Enter fullscreen mode Exit fullscreen mode

This can be applied to any other processes running to. Just replace grep jmeter to grep your-process-name


Stop a service running on a specified port

netstat -vanp tcp | grep <port> | awk '{print $9}' | xargs kill -9
Enter fullscreen mode Exit fullscreen mode

Remove docker images according to a pattern

docker images -a | grep <pattern> | awk '{print $3}' | xargs docker rmi -f
Enter fullscreen mode Exit fullscreen mode

Discussion (0)