简体   繁体   中英

How to find the number of Tabs open in a Mac Terminal

I want to find the number of terminals open in a mac for certain operations. Is there any way to do it without using top?

You can use following command to get the number of Tabs open in a Mac Terminal :

ps -afx | grep "\\-bash" | grep -iv "grep" | wc -l

$ ps -afx | grep "\-bash" | grep -iv "grep" | wc -l
       4
$
ps -el | grep bash | wc -l

对我来说很完美。

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