因为用了tmux,不想调整窗格大小,只想输出命令结果的最后几行,所以就想出了这个方法。
watch、echo、tail联合用法
watch 'echo "`nvidia-smi`" | tail -n 21'