如何使用top命令设置列表中的进程数?

问题描述 投票:-1回答:1

我尝试过top -b可以全部打印,而top -b -n 50也可以全部打印。我需要打印50行。

linux command
1个回答
-1
投票

尝试将输出传递给head命令。

top -b -n 1 | head -57

[57,因为top的输出开头有7条额外的行。

© www.soinside.com 2019 - 2024. All rights reserved.