
我用一個指令top -b | grep <searched text>
來監視一些進程。另外,我需要該命令的一些類似命令ps aux | grep <searched text>
。我的意思是我想定期查看該命令的輸出。實現我的目標的最佳方式是什麼?
答案1
使用 watch 指令等:
watch "ps aux | grep <searched text>"
您可以使用 -n 修改間隔
我用一個指令top -b | grep <searched text>
來監視一些進程。另外,我需要該命令的一些類似命令ps aux | grep <searched text>
。我的意思是我想定期查看該命令的輸出。實現我的目標的最佳方式是什麼?
使用 watch 指令等:
watch "ps aux | grep <searched text>"
您可以使用 -n 修改間隔