
top
호출할 때 결과를 제공하고 종료 하고 싶습니다 . 이것이 어떻게 달성될 수 있습니까?
top
~의맨페이지이 목적으로 나열된 플래그가 없습니다.
또한, 저는 이 목적으로 사용하고 싶지 않습니다 ps -eLf
.
답변1
~에서top
맨페이지:
-n : Number of iterations limit as: -n number Specifies the maximum number of iterations, or frames, top should produce before ending.
그러니 그냥 실행하세요:
top -n 1