Tag Info

Hot answers tagged

53

Not quite. The file is already open by the program. Deleting the file ( and then replacing it with another version ) does not affect the running program because the original file is held open ( though without a name on disk to open it again ) until the program is done with it. Only when all handles to the file are closed are its data blocks on disk ...


8

Is the xterm process cached in RAM whilst it is running? Exactly. It's similar to the process that allows you to install updates to things while they're running without them crashing. And also why you have to restart services after you update them. Once something is running, its binary is in memory. If it depends on other files (that aren't in a held ...


4

If you have only one java instance running, simply: renice -n 5 -p $(pgrep ^java$) $(pgrep ^java$): command substitution; bash replaces this with the output of pgrep ^java$; pgrep ^java$ returns the list of PIDs of the processes whose name matches the regular expression ^java$, which matches all processes whose name is exactly java If you have multiple ...


3

So basically you run a script that makes everything inaccessible, and you want quick and easy solution to stop it . An alternative to powercycling is to hold SYSRQ key (it's same as PRTSC key in many cases), and press one by one R, E, I,S,U,B. Basically that's a safe way to kill all running processes and restart the system. Alternative to that is to do ...


2

Try this: pgrep java | xargs -n 1 echo renice -n 5 -p If output is okay, remove echo.


2

It is in fact a feature of how computers work: When a program is invoked it is indeed loaded into the memory and it works from there. A file actually works in the same way. To avoid problems many files in UNIX-ish systems create locks. The actual riddle is why you can't do such and similar things in Windows. This feature is actually what allows you to ...


2

That is the freshclam daemon running that is causing that error message. If you check the log, tail -10 /var/log/clamav/freshclam.log you will probably see updates for the freshclam as early as today. As long as you're seeing updates, everything should be fine. If you want to change the intervals to the freshclam daemon, type in the following from a ...


2

You can easily do it with ps itself without need to any other tool: ps -U user-name -o comm= If you want some king of sorting and removing duplicate entries you can do this: ps -U user-name -o comm= | sort | uniq Here sample of my output: liferea mission-control nacl_helper nautilus nm-applet notify-osd nxclient.bin nxnode.bin obex-data-serve okular ...


2

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


1

Usually you can use top, htop or similar to find the process and and kill it (or if you know the name or PID of the process, you can killall, pkill etc). For example, using top, I can select a script running from terminal and kill it by pressing k+Enter: If that does not work, k+9+Enter should use the SIGKILL signal. SIGKILL requests that the process be ...


1

You need to kill the whole process group. The process group ID (PGID) is the PID of the process that started the group. To kill the process group you need to find the PID of the process that started the process group i.e. the script or command that started it all. The syntax is: kill -- -PGID For example: kill -- -1234 Here 1234 is the PGID (Process ...



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