Tag Info

Hot answers tagged


Using awk ps ax | awk '/java/ && !/eclipse/ {system("kill "$1)}' The command kills all java processes, but not the process eclipse.


Give a try to this command: ps ax | grep "java" | egrep -v "eclipse" | cut -b1-06 | xargs -t kill this will search for all processes containing java and execluding eclipse then kill them


First try SIGTERM 15 Term Termination signal if this doesn't work SIGKILL 9 Term Kill signal From man 7 signal First the signals described in the original POSIX.1-1990 standard. Signal Value Action Comment ────────────────────────────────────────────────────────────────────── SIGHUP 1 Term ...


Those are Process signals in general and not just related to htop, you can list all signals using the command kill -l For examplesource : -1 or -HUP - This argument makes kill send the "Hang Up" signal to processes. This probably originates from the modem/dial-in era. Processes have to be programmed to actually listen to this process and do ...


For the sake of completion, you can also use pgrep: pgrep -lU foobar this will match Real user ID of the user foobar. This will show the output with PIDs. If you want only the process names, also with removing duplicates: pgrep -lU foobar | cut -d' ' -f2 | sort -u ##Using RUID pgrep -lu foobar | cut -d' ' -f2 | sort -u ##Using EUID


In Ubuntu 15.04, in order to change hostname permanently you have to run this command: sudo hostnamectl set-hostname new-name You can check directly your new configuration: hostnamectl Static hostname: new-name Icon name: computer-vm Chassis: vm Machine ID: 458ad80036fa4cd4a3063116670ce33d Boot ID: ...


How about : pgrep -af 'java' | grep -Po '^[^ ]+(?!.*eclipse)' | xargs kill pgrep -af 'java' searches for java in the full command line of the processes and list them grep -Po '^[^ ]+(?!.*eclipse)' looks among the searched processes and get the process IDs of the processes that do not have eclipse in their full command lines xargs kill will kill the ...

Only top voted, non community-wiki answers of a minimum length are eligible