shell 无限循环输出时间 #!/bin/bash while(true) do date >> /home/k/a.log sleep 1 done 查看 tail -f /home/k/a.log