码迷,mamicode.com
首页 >  
搜索关键字:bash    ( 15235个结果
nginx日志每日定时写入Hdfs
#!/bin/bash hadoop_home=/opt/hadoop-2.4.0 tw_nginx_log_file=/home/chiline.com.all/access_com_tw.log cn_nginx_log_file=/home/chiline.com.all/access_com
分类:其他好文   时间:2016-02-17 19:07:05    阅读次数:170
pptp记录日志
/etc/ppp/ip-up #!/bin/bash # This file should not be modified -- make local changes to # /etc/ppp/ip-up.local instead PATH=/sbin:/usr/sbin:/bin:/usr/b
分类:其他好文   时间:2016-02-17 19:01:00    阅读次数:178
Shell编程—定时任务
服务器Reahat Linux: Bash HPUX:kbash? #!/bin/sh #!/bin/bash echo awk #输入重定向 > #管道 #执行 chmod 755 test.sh sh test.sh ./ test .sh
分类:系统相关   时间:2016-02-17 12:24:05    阅读次数:348
Linux Bash-控制语句
条件判断: 单分支if语句 if 条件表达式; then statement fi 双分支if语句 if 条件表达式; then statement else statement fi 多分支if语句 if 条件表达式; then statement elif 条件表达式; then stateme
分类:系统相关   时间:2016-02-16 23:21:05    阅读次数:237
Linux Bash-sed
sed:Stream Editor 作用 逐行读取,模式匹配,处理显示。默认不编辑源文件,仅对模式空间中的数据做处理,而后将模式空间予以打印。 选项 -n:静默模式。不显示模式空间中的内容。 -i:直接修改源文件。 -e SCRIPT -e SCRIPT:同时执行多个脚本。 -f /PATH/TO/
分类:系统相关   时间:2016-02-16 21:59:39    阅读次数:236
Linux学习:rc.sysinit
下面贴出的是centos6.5 /etc/rc.sysinit文件内容 #!/bin/bash # # /etc/rc.d/rc.sysinit - run once at boot time # # Taken in part from Miquel van Smoorenburg's bchec
分类:系统相关   时间:2016-02-16 20:37:14    阅读次数:318
dnspod单个修改与批理修改脚本
1 [root@localhost dnspod]# cat dnspod.sh 2 #!/bin/bash 3 function menu() { 4 clear 5 echo "*********************Dnspod************************" 6 echo
分类:其他好文   时间:2016-02-16 18:19:14    阅读次数:484
被动预防DDOS攻击
封IP地址 访问者通过浏览器正常访问网站,与服务器建立的连接一般不会超过20个,我们可以通过脚本禁止连接数过大的IP访问。以下脚本通过netstat命令列举所有连接,将连接数最高的一个IP如果连接数超过150,则通过iptables阻止访问:#!/bin/bash#writenbyzhuxiaoweion20160216#..
分类:其他好文   时间:2016-02-16 17:03:10    阅读次数:134
docker: 定时检查docker container的运行状态并发邮件报警
首先创建一个发送邮件的bash脚本 - send_mail.sh: #!/bin/bash curl -s --user 'api:key-xxxxxxxxxxxxx' \ https://api.mailgun.net/v3/xxxxxxx/messages \ -F from='Support
分类:其他好文   时间:2016-02-16 16:24:57    阅读次数:149
Linux下生提取一年中的周一和周日
#!/bin/bash##############################_Green="\033[32;1m"_Red="\033[31;1m"_End="\033[0m"##############################Server_Lang="`echo"${LANG}"`"Search_Time="`date+%Y%m%d%H%M%S`"##############################echo-e"${_Green}TheSystemDefaultLanguage:${S..
分类:系统相关   时间:2016-02-16 15:06:15    阅读次数:209
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!