Answers for "kill unecessary processes linux"

8

kill all processes by name linux

ps -ef | grep 'myProcessName' | grep -v grep | awk '{print $2}' | xargs -r kill -9
Posted by: Guest on May-13-2021
1

Check for process and kill if running Linux

if pgrep process_name 2>/dev/null; then
  echo "Terminating process_name"
  pkill process_name
fi
Posted by: Guest on May-11-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language