1.先看这两条命令,每秒都有输出:
【top -d 1 | grep 'id' 】
【top -d 1 | cut -d ',' -f 4】
这说明, top、grep、cut是每秒都有输出。
2.但是,再看这条问题命令:
【top -d 1 | grep 'id' | cut -d ',' -f 4】
问题来了,要等大半天,然后是一次性输出一堆。
请问这是怎么回事啊?
测试OS:
Red hat 5.9
Ubuntu Server 14.04
Debian 7.8
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证高级PHP讲师