First, you can use kill. But you need the pid of your process, which you can get by using ps, pidof or pgrep.
ps -A // to get the pid, can be combined with grep
-or-
pidof <name>
-or-
pgrep <name>
kill <pid>
It is possible to kill a process by just knowing the name. Use pkill or killall.
pkill <name>
-or-
killall <name>
All commands send a signal to the process. If the process hung up, it might be neccessary to send a sigkill to the process (this is signal number 9, so the following examples do the same):
pkill -9 <name>
pkill -SIGKILL <name>
You can use this option with kill and killall, too.
Read this article about controlling processes to get more informations about processes in general.
You can use the command pkill to kill processes. If you want to "play around", you can use "pgrep", which works exactly the same but returns the process rather than killing it.
pkill has the -f parameter that allows you to match against the entire command. So for your example, you can: pkill -f "gedit file.txt"
It is not clear to me what you mean by "escape an executable which is running", but ctrl-z will put a process into the background and return control to the command line. You can then use the fg command to bring the program back into the foreground.
To interrupt it, you can try pressing ctrlc to send a SIGINT. If it doesn't stop it, you may try to kill it using kill -9 <pid>, which sends a SIGKILL. The latter can't be ignored/intercepted by the process itself (the one being killed).
To move the active process to background, you can press ctrlz. The process is sent to background and you get back to the shell prompt. Use the fg command to do the opposite.
Please check "top" command then if your script or any are running please note 'PID'
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1384 root 20 0 514m 32m 2188 S 0.3 5.4 55:09.88 example
14490 root 20 0 15140 1216 920 R 0.3 0.2 0:00.02 example2
kill <you process ID>
Example : kill 1384