简体   繁体   中英

How to get and kill the process Mac terminal

  1. Find specific client with name and memory
  2. Get the client pId
  3. Kill pId

Can I do kill that process just within the terminal.

What I tried

ps aux | grep leagueClientUxHelper | awk '{print $2}'

but I can't get the large memory process.

Same process names in activated status:

处于激活状态的相同进程名称

You can kill a process with the id by using the kill command.

ps aux | grep TextEdit | awk '{print $2}' | xargs kill

That will pipe it directly into the kill command. You will get an error because the ps aux will show two PIDs but it won't cause any problems.

Kill only works with PIDs

Are you trying to drill down to a certain memory length or compared to another instance like league1 memory is > leage2 memory?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM