ITPub博客

首页 > Linux操作系统 > Linux操作系统 > linux shell 每秒运行

linux shell 每秒运行

Linux操作系统 作者:season0891 时间:2014-01-07 21:06:19 0 删除 编辑

[root@web01 tmp]# cat /tmp/secondrun.sh
#!/bin/sh
while [ true ];
do
/bin/sleep 1
/bin/date >> /tmp/date.log
done

 

[root@web01 tmp]# nohup /tmp/secondrun.sh 2>&1 >/dev/null &

[root@web01 tmp]# /tmp/secondrun.sh &

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/90618/viewspace-1068099/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-06-10

  • 博文量
    790
  • 访问量
    2098027