ps -ef|grep prometheus|awk '{print $2}'|xargs kill -9

awk '{print $2}' It's the process pid Jump out ,xargs Command to convert standard input to command line parameters .
xargs Usage examples

echo "one two three" | xargs mkdir

The above command can create three folders , The names are one two three

<>-d Specify separator

By default ,xargs Use line breaks and spaces as separators , Decompose standard input into command line parameters .-d Parameters can change the separator .

$ echo -e “a\tb\tc” | xargs -d “\t” echo
a b c

<>-p -t Print execution command

use xargs After command , Due to conversion parameter procedure , Sometimes you need to confirm what command is executed .

-p Parameters print out the command to be executed , Ask users if they want to execute .

$ echo ‘one two three’ | xargs -p touch
touch one two three ?..

After the above command is executed , Will print out the final command to be executed , Let users confirm . User input y in the future ( Both upper and lower case ), It's really going to work .
-t Parameters print out the final command to be executed , And then directly , No user confirmation required .

$ echo ‘one two three’ | xargs -t rm
rm one two three

©2019-2020 Toolsou All rights reserved,
PostgreSQL: Nine . Indexes latex Custom commands in ———\newcommand Obviously post Why does the request display parameters in the address bar ? Three methods of value transfer between non parent and child components Paging tool class PageResult Ai Wei also talks about project management , On grass roots management ( Essence )2020 year 7 month 30 day Wechat applet Use of modules C Language confession practice small program ( Suitable for beginners ) Shortest path Dijkstra (Python3)@Repository The role of annotations