Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在做一个系统监控项目,想知道如何在运行 iostat -x 时只返回 Device、r/s 和 w/s 列。我确定我必须使用一些方法,但我尝试在这里获取第 4 列 (r/s):iostat -x | cut -f 4 不正确
尝试这个:
iostat -x | awk '{print $4}'
或者
iostat -x | sed '1,/Device:/d' | awk '{print $4}'