Commande kill

jhon2000 Messages postés 3 Date d'inscription   Statut Membre Dernière intervention   -  
jhon2000 Messages postés 3 Date d'inscription   Statut Membre Dernière intervention   -
bonjour à tout le monde,
je cherche depuis un bon moment comment peut on utiliser la commande kill pour arrêter un processus qui utilise la commande Grep,mais je n'arrive pas a trouver de solution.Y a t il quelqu'un qui a une idée? Merci
A voir également:

2 réponses

dubcek Messages postés 18789 Date d'inscription   Statut Contributeur Dernière intervention   5 637
 
hello
voir la commande pkill
1
jisisv Messages postés 3645 Date d'inscription   Statut Modérateur Dernière intervention   934
 
Tu peux t'inspirer de ceci:
johand@bata:~/tmp$ grep truc & grep brol & echo -e "\n\n"
[1] 9963
[2] 9964



johand@bata:~/tmp$ pgrep -a grep
9963 grep truc
9964 grep brol

[1]- Stoppé grep truc

[2]+ Stoppé grep brol
johand@bata:~/tmp$ kill -KILL 9963
johand@bata:~/tmp$ pgrep -a grep
9964 grep brol
[1]- Processus arrêté grep truc


Regarde aussi man pstree:
johand@bata:~/tmp$ grep truc | sort | sed -e 's/a/HAHA/' &
[1] 10089
johand@bata:~/tmp$ pstree -p $$
bash(8316)─┬─grep(10087)
           ├─pstree(10090)
           ├─sed(10089)
           └─sort(10088)

[1]+  Stoppé                 grep truc | sort | sed -e 's/a/HAHA/'
johand@bata:~/tmp$ kill -KILL 10087 ; pstree -p $$
bash(8316)─┬─pstree(10091)
           ├─sed(10089)
           └─sort(10088)

[1]+  Stoppé                 grep truc | sort | sed -e 's/a/HAHA/'
johand@bata:~/tmp$ fg
grep truc | sort | sed -e 's/a/HAHA/'


Gates gave ^W  sold  you the windows.
GNU gave us the whole house.(Alexandrin)
0
jhon2000 Messages postés 3 Date d'inscription   Statut Membre Dernière intervention  
 
merci pour la réponse je vais la tester pour voir
0