Raffaele Morelli wrote:
> pkill is a better killall? it reminds me to the differences between top and > htop (recently someone posted about it). But how is it better?Really don't know, my rule is "the one which fits to your needs". I always use killall and feel comfortable with. Sometimes I use kill, e.g. when killing a process is not enough and some files are showed to be open by lsof after a killall or a kill -9.lsof man page illustrates a -t option which lets you pipe "terse" output to kill, which makes me suppose 'kill -9 pid' does not kill hanging files belonging to processes.Celejar raffaele
There's no such thing, that I know of, as 'kill hanging files'. 'lsof' will give you process id's (PID values) with lots of other info, unless -t is used, which is just the list of PID values.
You then use the PID values to kill the processes.When a process dies, all its open files are closed, either by itself or by the system on its behalf. This is true even if 'kill -9' is used, the system takes cleanup on exit very seriously.
The net result is that open files go away, and the filesystem is no longer 'busy' and can be umount'ed.
smime.p7s
Description: S/MIME Cryptographic Signature