随笔分类 -  linux

摘要:#!/usr/bin/env bashsource /etc/profileecho " *************** start filter *************** "# get befor six month last day#m0=$(date -d "$(date -d 'mon 阅读全文
posted @ 2018-11-27 11:05 anitinaj 阅读(1144) 评论(0) 推荐(0)
摘要:查看定时任务 crontab -l 注册定时任务 crontab -e然后就像 vim 一样编辑自己的定时任务。如: * * * * * . /home/hadoop/timer/check_job.sh >> /home/hadoop/timer/logs/check_job.log 定时任务解析 阅读全文
posted @ 2018-11-27 10:57 anitinaj 阅读(757) 评论(0) 推荐(0)
摘要:用shell脚本监控进程是否存在 不存在则启动的实例,先上代码干货: 1 2 3 4 5 6 7 8 #!/bin/sh ps -fe|grep processString |grep -v grep if [ $? -ne 0 ] then echo "start process....." el 阅读全文
posted @ 2017-08-31 10:31 anitinaj 阅读(22946) 评论(4) 推荐(1)