First of all you must understand how processes work in linux.
when sudo starts a process in the background and you try to trap the pid with $! (which is the pid of the most recent process put in the background) then you get the pid of this sudo process. Probably this process spawns other processes in the background and then finishes. Now you would like to kill all those spawned processes. But how to get them?
- disown //can be used to put a started process in the background and close the shell
startcoolprogram ^Z + Stopped startcoolprogram $ bg %1 + startcoolprogram & $ disown
|do recursive find in content of files|
|what’s wrong with my pen drive?||sudo dmesg|
Was this helpful?
0 / 0