Re: killing a process when a user logout on FC3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  I wanted to kill a process when the user logout.When the user logs in one
> can get the process id through this
>
>  ps -ef | grep  process > /etc/spli.txt

i recommend that you do the following otherwise the grep could show up in the ps

ps -ef | grep  [p]rocess > /etc/spli.txt

>  How do I extract the 2nd field from the file(/etc/spli.txt), I know awk or
> with sed one can do it but I don't know these scripting tools.

awk '{print $2}' /etc/spli.txt


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux