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

Technology
©2019-2020 Toolsou All rights reserved,
java Four functional interfaces ( a key , simple )os Simple use of module Browser kernel ( understand ) Some East 14 Pay change 16 salary , Sincerity or routine ?HashMap Explain in detail It's unexpected Python Cherry tree (turtle The gorgeous style of Library )html Writing about cherry trees , Writing about cherry trees