+-
在Linux中自动重复命令
是否有可能在 linux命令行中每n秒重复一次命令.

例如,假设我有一个导入运行,我正在做

ls -l

检查文件大小是否增加.我想有一个命令让它自动重复.

最佳答案
每5秒观看一次……

看-n 5 ls -l

如果您希望直观地确认更改,请在ls命令之前附加–differences.

根据OSX手册页,还有

The –cumulative option makes highlighting “sticky”, presenting a
running display of all positions that have ever changed. The -t
or –no-title option turns off the header showing the interval,
command, and current time at the top of the display, as well as the
following blank line.

Linux / Unix手册页可以找到here

点击查看更多相关文章

转载注明原文:在Linux中自动重复命令 - 乐贴网